Sha256: c89c92329b29d3ca1456bd75cf884d31008a9026e61166bcdcb853fb3c1a5f3d

Contents?: true

Size: 495 Bytes

Versions: 13

Compression:

Stored size: 495 Bytes

Contents

require 'rails_helper'


RSpec.describe Kithe::Collection, type: :model do
  let(:collection) { FactoryBot.create(:kithe_collection) }
  let(:asset) { FactoryBot.create(:kithe_asset) }


  it "can create with title" do
    work = Kithe::Collection.create(title: "some title")
    expect(work).to be_present
    expect(work.title).to eq "some title"
  end

  it "requires a title" do
    expect {
      work = Kithe::Collection.create!
    }.to raise_error(ActiveRecord::RecordInvalid)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kithe-2.0.2 spec/models/kithe/collection_spec.rb
kithe-2.0.1 spec/models/kithe/collection_spec.rb
kithe-2.0.0 spec/models/kithe/collection_spec.rb
kithe-2.0.0.pre.rc1 spec/models/kithe/collection_spec.rb
kithe-2.0.0.pre.beta1 spec/models/kithe/collection_spec.rb
kithe-2.0.0.pre.alpha2 spec/models/kithe/collection_spec.rb
kithe-2.0.0.pre.alpha1 spec/models/kithe/collection_spec.rb
kithe-1.1.2 spec/models/kithe/collection_spec.rb
kithe-1.1.1 spec/models/kithe/collection_spec.rb
kithe-1.1.0 spec/models/kithe/collection_spec.rb
kithe-1.0.0 spec/models/kithe/collection_spec.rb
kithe-0.3.0 spec/models/kithe/collection_spec.rb
kithe-0.2.0 spec/models/kithe/collection_spec.rb