Sha256: c106511eae84139c51e91ce0590f64d6c28117d446f406dd68220333322d1d3d
Contents?: true
Size: 644 Bytes
Versions: 1
Compression:
Stored size: 644 Bytes
Contents
require "spec_helper" describe Shamu::Security::Principal do describe "#scoped?" do it "is true for any scope when not limited" do principal = Shamu::Security::Principal.new scopes: nil expect( principal ).to be_scoped :all expect( principal ).to be_scoped :bananas end it "is true for given scope" do principal = Shamu::Security::Principal.new scopes: [ :admin ] expect( principal ).to be_scoped :admin end it "is false for ungiven scope" do principal = Shamu::Security::Principal.new scopes: [ :admin ] expect( principal ).not_to be_scoped :bananas end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shamu-0.0.24 | spec/lib/shamu/security/principal_spec.rb |