Sha256: 79b73f46248313c5b72fbdcc910a6e4178a0ca357b2098e52b6e881a73c8a970

Contents?: true

Size: 594 Bytes

Versions: 7

Compression:

Stored size: 594 Bytes

Contents

FactoryBot.define do
  factory :search, class: Spotlight::Search do
    exhibit
    sequence(:title) { |n| "Exhibit Search #{n}" }
    sequence(:slug) { |n| "Search#{n}" }

    after(:build) { |search| search.thumbnail = FactoryBot.create(:featured_image) }
  end

  factory :published_search, parent: :search do
    published { true }
  end

  factory :default_search, class: Spotlight::Search do
    exhibit
    title { 'All Exhibit Items' }
    long_description { 'All items in this exhibit.' }

    after(:build) { |search| search.thumbnail = FactoryBot.create(:featured_image) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/factories/searches.rb
blacklight-spotlight-2.4.0 spec/factories/searches.rb
blacklight-spotlight-2.3.3 spec/factories/searches.rb
blacklight-spotlight-2.3.2 spec/factories/searches.rb
blacklight-spotlight-2.3.1 spec/factories/searches.rb
blacklight-spotlight-2.3.0 spec/factories/searches.rb
blacklight-spotlight-2.2.1 spec/factories/searches.rb