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.7.6 spec/support/shared_examples_for_governables.rb
ddr-models-2.7.5 spec/support/shared_examples_for_governables.rb
ddr-models-2.7.4 spec/support/shared_examples_for_governables.rb
ddr-models-2.7.3 spec/support/shared_examples_for_governables.rb
ddr-models-2.7.2 spec/support/shared_examples_for_governables.rb
ddr-models-2.7.1 spec/support/shared_examples_for_governables.rb
ddr-models-2.7.0 spec/support/shared_examples_for_governables.rb
ddr-models-2.7.0.rc1 spec/support/shared_examples_for_governables.rb
ddr-models-2.6.2 spec/support/shared_examples_for_governables.rb
ddr-models-2.6.1 spec/support/shared_examples_for_governables.rb
ddr-models-2.6.0 spec/support/shared_examples_for_governables.rb
ddr-models-2.6.0.rc4 spec/support/shared_examples_for_governables.rb
ddr-models-2.6.0.rc3 spec/support/shared_examples_for_governables.rb
ddr-models-2.6.0.rc2 spec/support/shared_examples_for_governables.rb
ddr-models-2.6.0.rc1 spec/support/shared_examples_for_governables.rb
ddr-models-2.5.3 spec/support/shared_examples_for_governables.rb
ddr-models-2.5.2 spec/support/shared_examples_for_governables.rb
ddr-models-2.5.1 spec/support/shared_examples_for_governables.rb
ddr-models-2.5.0 spec/support/shared_examples_for_governables.rb
ddr-models-2.5.0.rc1 spec/support/shared_examples_for_governables.rb