Sha256: 418b0b803e86bd261a9330254e9a79a01ca27253e82e9bac17f999e865e84dba

Contents?: true

Size: 427 Bytes

Versions: 50

Compression:

Stored size: 427 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.build(type: "Editor", agent: user.agent, scope: "resource")])
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
ddr-models-2.4.16 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.15 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.14 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.13 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.12 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.11 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.10 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.9 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.8 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.7 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.6 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.5 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.4 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.3 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.2 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.1 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.0 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.0.rc6 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.0.rc5 spec/support/shared_examples_for_non_collection_models.rb
ddr-models-2.4.0.rc4 spec/support/shared_examples_for_non_collection_models.rb