spec/authority_spec.rb in authority-1.0.0.pre3 vs spec/authority_spec.rb in authority-1.0.0.pre4
- old
+ new
@@ -42,15 +42,15 @@
before :each do
@user = User.new
end
- it "should raise a SecurityTransgression if the action is unauthorized" do
- expect { Authority.enforce(:update, AbilityModel, @user) }.to raise_error(Authority::SecurityTransgression)
+ it "should raise a SecurityViolation if the action is unauthorized" do
+ expect { Authority.enforce(:update, AbilityModel, @user) }.to raise_error(Authority::SecurityViolation)
end
- it "should not raise a SecurityTransgression if the action is authorized" do
- expect { Authority.enforce(:read, AbilityModel, @user) }.not_to raise_error(Authority::SecurityTransgression)
+ it "should not raise a SecurityViolation if the action is authorized" do
+ expect { Authority.enforce(:read, AbilityModel, @user) }.not_to raise_error(Authority::SecurityViolation)
end
end
end