]> git.openstreetmap.org Git - rails.git/blobdiff - test/abilities/abilities_test.rb
Move xml gen. into view for (old) nodes, ways, relations, map
[rails.git] / test / abilities / abilities_test.rb
index b951e23e5b68b0b5fcfcb3e4f22a6dd04c0ec09b..f43b6bf50de811b2f5b5fcc66fdca7d82e99b299 100644 (file)
@@ -30,13 +30,9 @@ class GuestAbilityTest < AbilityTest
   test "note permissions for a guest" do
     ability = Ability.new nil
 
-    [:index, :create, :comment, :feed, :show, :search, :mine].each do |action|
+    [:mine].each do |action|
       assert ability.can?(action, Note), "should be able to #{action} Notes"
     end
-
-    [:close, :reopen, :destroy].each do |action|
-      assert ability.cannot?(action, Note), "should not be able to #{action} Notes"
-    end
   end
 
   test "user roles permissions for a guest" do
@@ -65,18 +61,6 @@ class UserAbilityTest < AbilityTest
       assert ability.cannot?(action, Issue), "should not be able to #{action} Issues"
     end
   end
-
-  test "Note permissions" do
-    ability = Ability.new create(:user)
-
-    [:index, :create, :comment, :feed, :show, :search, :mine, :close, :reopen].each do |action|
-      assert ability.can?(action, Note), "should be able to #{action} Notes"
-    end
-
-    [:destroy].each do |action|
-      assert ability.cannot?(action, Note), "should not be able to #{action} Notes"
-    end
-  end
 end
 
 class ModeratorAbilityTest < AbilityTest
@@ -88,14 +72,6 @@ class ModeratorAbilityTest < AbilityTest
     end
   end
 
-  test "Note permissions" do
-    ability = Ability.new create(:moderator_user)
-
-    [:index, :create, :comment, :feed, :show, :search, :mine, :close, :reopen, :destroy].each do |action|
-      assert ability.can?(action, Note), "should be able to #{action} Notes"
-    end
-  end
-
   test "User Roles permissions" do
     ability = Ability.new create(:moderator_user)