From: Andy Allan Date: Wed, 31 Oct 2018 10:42:49 +0000 (+0100) Subject: Fix error messages when users should not be able to do things X-Git-Tag: live~3375^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/7a177cb03f0b8865cbf8cdea95208046450776ff?ds=sidebyside;hp=--cc Fix error messages when users should not be able to do things --- 7a177cb03f0b8865cbf8cdea95208046450776ff diff --git a/test/models/abilities_test.rb b/test/models/abilities_test.rb index be0b61af8..fc37b0e7d 100644 --- a/test/models/abilities_test.rb +++ b/test/models/abilities_test.rb @@ -22,8 +22,8 @@ class GuestAbilityTest < AbilityTest end [:create, :edit, :comment, :subscribe, :unsubscribe, :hide, :hidecomment].each do |action| - assert ability.cannot?(action, DiaryEntry), "should be able to #{action} DiaryEntries" - assert ability.cannot?(action, DiaryComment), "should be able to #{action} DiaryEntries" + assert ability.cannot?(action, DiaryEntry), "should not be able to #{action} DiaryEntries" + assert ability.cannot?(action, DiaryComment), "should not be able to #{action} DiaryEntries" end end end @@ -37,8 +37,8 @@ class UserAbilityTest < AbilityTest end [:hide, :hidecomment].each do |action| - assert ability.cannot?(action, DiaryEntry), "should be able to #{action} DiaryEntries" - assert ability.cannot?(action, DiaryComment), "should be able to #{action} DiaryEntries" + assert ability.cannot?(action, DiaryEntry), "should not be able to #{action} DiaryEntries" + assert ability.cannot?(action, DiaryComment), "should not be able to #{action} DiaryEntries" end [:index, :show, :resolve, :ignore, :reopen].each do |action|