Sha256: f08bb5e3f859a864b0b740267653d47fb8e9e128feb6c8b47066e34e25bcb692

Contents?: true

Size: 430 Bytes

Versions: 31

Compression:

Stored size: 430 Bytes

Contents

RSpec.shared_examples "a non-collection model" do
  describe "roles granted to creator" do
    subject { described_class.new }
    let(:user) { FactoryGirl.build(:user) }
    before { subject.grant_roles_to_creator(user) }
    it "should include the Editor role in resource scope" do
      expect(subject.roles.to_a).to eq([Ddr::Auth::Roles::Role.new(role_type: "Editor", agent: user.agent, scope: "resource")])
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
ddr-models-3.0.8 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.7 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.6 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.5 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.4 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.3 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.2 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.1 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.rc6 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.rc5 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.rc4 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.rc3 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.rc2 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.rc1 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.beta.22 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.beta.21 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.beta.20 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.beta.18 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-3.0.0.beta.17 spec/support/shared_examples_for_non_collection_models.rb