spec/scoping_permissions_spec.rb in permissive-0.2.5.alpha vs spec/scoping_permissions_spec.rb in permissive-0.2.6.alpha
- old
+ new
@@ -27,10 +27,12 @@
@user.can?(:manage_games, :on => @organization).should be_true
end
it "should not respond to generic permissions on scoped permissions" do
@user.can!(:manage_games, :on => @organization)
- @user.can?(:manage_games).should be_false
+ lambda {
+ @user.can?(:manage_games).should be_false
+ }.should raise_error(Permissive::InvalidPermissionError)
@user.can?(:manage_games, :on => @organization).should be_true
end
it "should revoke the correct permissions through the `revoke' method" do
@user.can!(:manage_games, :control_rides, :on => @organization)
\ No newline at end of file