Sha256: 8e08cf76c2288a4780ca499d5cc6c54da9ec651625433ab2b18910e8abedeaef

Contents?: true

Size: 424 Bytes

Versions: 16

Compression:

Stored size: 424 Bytes

Contents

describe Collection do
  let(:collection) { create(:public_collection) }

  it "has open visibility" do
    expect(collection.read_groups).to eq ['public']
  end

  describe "#validates_with" do
    before { collection.title = nil }
    it "ensures the collection has a title" do
      expect(collection).not_to be_valid
      expect(collection.errors.messages[:title]).to eq(["You must provide a title"])
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sufia-7.4.1 spec/models/collection_spec.rb
sufia-7.4.0 spec/models/collection_spec.rb
sufia-7.3.1 spec/models/collection_spec.rb
sufia-7.3.0 spec/models/collection_spec.rb
sufia-7.3.0.rc3 spec/models/collection_spec.rb
sufia-7.3.0.rc2 spec/models/collection_spec.rb
sufia-7.3.0.rc1 spec/models/collection_spec.rb
sufia-7.2.0 spec/models/collection_spec.rb
sufia-7.1.0 spec/models/collection_spec.rb
sufia-7.0.0 spec/models/collection_spec.rb
sufia-7.0.0.rc2 spec/models/collection_spec.rb
sufia-7.0.0.rc1 spec/models/collection_spec.rb
sufia-7.0.0.beta4 spec/models/collection_spec.rb
sufia-7.0.0.beta3 spec/models/collection_spec.rb
sufia-7.0.0.beta2 spec/models/collection_spec.rb
sufia-7.0.0.beta1 spec/models/collection_spec.rb