Sha256: fb72318fd78397392154d6889de423095b80e8ae7afdb2a534064d775f5fb190

Contents?: true

Size: 523 Bytes

Versions: 38

Compression:

Stored size: 523 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :exhibit, class: 'Spotlight::Exhibit' do
    sequence(:title) { |n| "Exhibit Title #{n}" }
    published { true }
    after(:build) { |exhibit| exhibit.searches << FactoryBot.build(:default_search, exhibit: exhibit) }

    trait :with_thumbnail do
      association :thumbnail, factory: :exhibit_thumbnail
    end
  end
  factory :skinny_exhibit, class: 'Spotlight::Exhibit' do
    sequence(:title) { |n| "Exhibit Title #{n}" }
    published { true }
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
blacklight-spotlight-4.2.0 spec/factories/exhibits.rb
blacklight-spotlight-4.1.2 spec/factories/exhibits.rb
blacklight-spotlight-4.1.1 spec/factories/exhibits.rb
blacklight-spotlight-4.1.0 spec/factories/exhibits.rb
blacklight-spotlight-4.0.3 spec/factories/exhibits.rb
blacklight-spotlight-4.0.2 spec/factories/exhibits.rb
blacklight-spotlight-4.0.1 spec/factories/exhibits.rb
blacklight-spotlight-4.0.0 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta10 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta9 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta8 spec/factories/exhibits.rb
blacklight-spotlight-3.5.0.4 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta7 spec/factories/exhibits.rb
blacklight-spotlight-3.5.0.3 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta6 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta5 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta4 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta3 spec/factories/exhibits.rb
blacklight-spotlight-3.6.0.beta1 spec/factories/exhibits.rb
blacklight-spotlight-3.5.0.2 spec/factories/exhibits.rb