Sha256: 43aae3e2413b7ca827c6597cb4bc3db51c70ed5a565fe58c301790eddb3f9b10

Contents?: true

Size: 586 Bytes

Versions: 13

Compression:

Stored size: 586 Bytes

Contents

RSpec.shared_examples "a governable object" do
  let(:object) do
    described_class.new.tap do |obj|
      obj.desc_metadata.title = [ 'Describable' ]
      obj.desc_metadata.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.id).admin_policy).to eq(coll)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ddr-models-3.0.0.beta.18 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.17 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.16 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.15 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.14 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.13 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.12 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.11 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.10 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.9 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.8 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.7 spec/support/shared_examples_for_governables.rb
ddr-models-3.0.0.beta.6 spec/support/shared_examples_for_governables.rb