Sha256: a42aa1b21a993c17901c81e4f5bbeb91fa4e1bde44d9a50d3c1b31b45170396a
Contents?: true
Size: 1.29 KB
Versions: 2
Compression:
Stored size: 1.29 KB
Contents
describe Unidom::Authorization::Authorizing, type: :model do before :each do end after :each do end context do model_attributes = { authorizer_id: SecureRandom.uuid, authorizer_type: 'Unidom::Authorization::Authorizer::Mock', authorized_id: SecureRandom.uuid, authorized_type: 'Unidom::Authorization::Authorized::Mock', permission_id: SecureRandom.uuid } it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes permission_attributes = { name: 'User Management', path: 'administration/users' } it_behaves_like 'belongs_to', model_attributes, :permission, Unidom::Authorization::Permission, permission_attributes it_behaves_like 'scope', :permission_is, [ { attributes_collection: [ model_attributes ], count_diff: 1, args: [ model_attributes[:permission_id] ] }, { attributes_collection: [ model_attributes ], count_diff: 1, args: [ Unidom::Authorization::Permission.new(id: model_attributes[:permission_id]) ] }, { attributes_collection: [ model_attributes ], count_diff: 0, args: [ model_attributes[:authorized_id] ] }, { attributes_collection: [ model_attributes ], count_diff: 0, args: [ Unidom::Authorization::Permission.new(id: model_attributes[:authorized_id]) ] } ] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
unidom-authorization-1.6.3 | lib/rspec/models/unidom/authorization/authorizing_spec.rb |
unidom-authorization-1.6.2 | lib/rspec/models/unidom/authorization/authorizing_spec.rb |