refactoring fully authorized check and catching bug

This commit is contained in:
Ryan Bates
2011-03-25 13:30:45 -07:00
parent 488cc2dfdd
commit 242e912519
2 changed files with 12 additions and 5 deletions
+2
View File
@@ -259,6 +259,8 @@ describe CanCan::Ability do
@ability.can :update, :ranges, :begin => 1
@ability.authorize! :update, :ranges
@ability.should_not be_fully_authorized(:update, :ranges)
@ability.authorize! "update", "ranges"
@ability.should_not be_fully_authorized(:update, :ranges)
end
it "is not fully authorized when a block exists but no instance is used" do