Sha256: 151cd25e4da845df96eda1b6b5859d80af6be882d1273e95b195d212f011352d

Contents?: true

Size: 386 Bytes

Versions: 54

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

FactoryBot.define do
  factory :group, class: 'Spotlight::Group' do
    exhibit

    factory :group_with_searches do
      transient do
        searches_count { 5 }
      end
    end

    after(:create) do |group, evaluator|
      create_list(:search, evaluator.searches_count, groups: [group]) if evaluator.respond_to?(:searches_count)
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.2.1 spec/factories/group.rb
blacklight-spotlight-3.4.2 spec/factories/group.rb
blacklight-spotlight-3.4.0 spec/factories/group.rb
blacklight-spotlight-3.3.0 spec/factories/group.rb
blacklight-spotlight-3.2.0 spec/factories/group.rb
blacklight-spotlight-3.1.0 spec/factories/group.rb
blacklight-spotlight-3.0.3 spec/factories/group.rb
blacklight-spotlight-3.0.2 spec/factories/group.rb
blacklight-spotlight-3.0.1 spec/factories/group.rb
blacklight-spotlight-3.0.0 spec/factories/group.rb
blacklight-spotlight-3.0.0.rc6 spec/factories/group.rb
blacklight-spotlight-3.0.0.rc5 spec/factories/group.rb
blacklight-spotlight-3.0.0.rc4 spec/factories/group.rb
blacklight-spotlight-3.0.0.rc3 spec/factories/group.rb