Sha256: bbd37276391ca8a2657dd7cca441d66c81bd4dd7d8ec01364429714106d79b47

Contents?: true

Size: 571 Bytes

Versions: 102

Compression:

Stored size: 571 Bytes

Contents

RSpec.shared_examples "a governable object" do
  let(:object) do
    described_class.new.tap do |obj|
      obj.title = [ 'Describable' ]
      obj.identifier = [ 'id001' ]
      obj.save(validate: false)
    end
  end
  describe "can have an admin policy" do
    let(:coll) { FactoryGirl.create(:collection) }
    it "should set its admin policy with #admin_policy= and get with #admin_policy" do
      object.admin_policy = coll
      object.save(validate: false)
      expect(ActiveFedora::Base.find(object.pid, cast: true).admin_policy).to eq(coll)
    end
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

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