Sha256: 04efc03ee47a63a626d17fa8d8de69f4d7fd191abed3254e309677b86864d43a
Contents?: true
Size: 708 Bytes
Versions: 1
Compression:
Stored size: 708 Bytes
Contents
require File.dirname(__FILE__) + "/../spec_helper" describe Walruz::Manager do describe "#check_authorization" do it "should invoke the policies associated to an action on a subject performed by an actor" do result = Walruz::Manager.check_authorization(Beatle::JOHN, :sing, Song::ALL_YOU_NEED_IS_LOVE) result[0].should be_true end describe "when executing validations on an invalid subject" do it "should raise an Walruz::AuthorizationActionsNotDefined error" do lambda do Walruz::Manager.check_authorization(Beatle::JOHN, :talk_with, Beatle::PAUL) end.should raise_error(Walruz::AuthorizationActionsNotDefined) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
walruz-0.0.8 | spec/walruz/manager_spec.rb |