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-1.11.7 spec/support/shared_examples_for_governables.rb
ddr-models-1.12.2 spec/support/shared_examples_for_governables.rb
ddr-models-1.11.6 spec/support/shared_examples_for_governables.rb
ddr-models-1.12.1 spec/support/shared_examples_for_governables.rb
ddr-models-1.11.5 spec/support/shared_examples_for_governables.rb
ddr-models-1.12.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.11.4 spec/support/shared_examples_for_governables.rb
ddr-models-1.11.3 spec/support/shared_examples_for_governables.rb
ddr-models-1.11.2 spec/support/shared_examples_for_governables.rb
ddr-models-1.11.1 spec/support/shared_examples_for_governables.rb
ddr-models-1.11.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.10.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.9.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.8.1 spec/support/shared_examples_for_governables.rb
ddr-models-1.8.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.7.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.6.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.5.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.4.0 spec/support/shared_examples_for_governables.rb
ddr-models-1.3.0 spec/support/shared_examples_for_governables.rb