Sha256: 151cd25e4da845df96eda1b6b5859d80af6be882d1273e95b195d212f011352d

Contents?: true

Size: 386 Bytes

Versions: 47

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

47 entries across 47 versions & 1 rubygems

Version Path
blacklight-spotlight-4.3.6 spec/factories/group.rb
blacklight-spotlight-4.3.5 spec/factories/group.rb
blacklight-spotlight-4.3.4 spec/factories/group.rb
blacklight-spotlight-4.3.3 spec/factories/group.rb
blacklight-spotlight-4.3.2 spec/factories/group.rb
blacklight-spotlight-4.3.1 spec/factories/group.rb
blacklight-spotlight-4.3.0 spec/factories/group.rb
blacklight-spotlight-4.2.0 spec/factories/group.rb
blacklight-spotlight-4.1.2 spec/factories/group.rb
blacklight-spotlight-4.1.1 spec/factories/group.rb
blacklight-spotlight-4.1.0 spec/factories/group.rb
blacklight-spotlight-4.0.3 spec/factories/group.rb
blacklight-spotlight-4.0.2 spec/factories/group.rb
blacklight-spotlight-4.0.1 spec/factories/group.rb
blacklight-spotlight-4.0.0 spec/factories/group.rb
blacklight-spotlight-3.6.0.beta10 spec/factories/group.rb
blacklight-spotlight-3.6.0.beta9 spec/factories/group.rb
blacklight-spotlight-3.6.0.beta8 spec/factories/group.rb
blacklight-spotlight-3.5.0.4 spec/factories/group.rb
blacklight-spotlight-3.6.0.beta7 spec/factories/group.rb