Sha256: a185c8f7c0c1abddaa74aa3aaa61f5a283a863f5fff8e2de2568a5c874b2fefe
Contents?: true
Size: 922 Bytes
Versions: 82
Compression:
Stored size: 922 Bytes
Contents
module Ddr::Auth module Roles RSpec.describe PropertyRoleSet, roles: true do subject { described_class.new(wrapped) } let(:wrapped_class) do Class.new(ActiveTriples::Resource) do property :role, predicate: Ddr::Vocab::Roles.hasRole end end let(:wrapped) { wrapped_class.new.role } it_behaves_like "a role set" describe "equality" do let(:role1) { FactoryGirl.build(:role, :curator, :person, :policy) } let(:role2) { FactoryGirl.build(:role, :editor, :group, :resource) } let(:other) { described_class.new(wrapped_class.new.role) } before do subject.grant role1, role2 other.grant role2, role1 end it "should be equal to another role set if it has the same roles, regardless of order" do expect(subject).to eq(other) end end end end end
Version data entries
82 entries across 82 versions & 1 rubygems