Sha256: 5d19d4203a67fafcfe06d420a267ae6545384ff657a54ebaa195983ab7a1ca84

Contents?: true

Size: 1.45 KB

Versions: 17

Compression:

Stored size: 1.45 KB

Contents

FactoryBot.define do
  factory :unstarted_reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
    items_reindexed_count 15
    job_status 'unstarted'
    exhibit
    user
  end

  factory :reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
    items_reindexed_count 10
    start_time { Time.zone.parse('2017-01-05 23:00:00') }
    end_time { Time.zone.parse('2017-01-05 23:05:00') }
    job_status 'succeeded'
    exhibit
    user
  end

  factory :reindexing_log_entry_no_user, class: Spotlight::ReindexingLogEntry do
    items_reindexed_count 10
    start_time { Time.zone.parse('2017-01-05 23:00:00') }
    end_time { Time.zone.parse('2017-01-05 23:05:00') }
    job_status 'succeeded'
    exhibit
  end

  factory :in_progress_reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
    items_reindexed_count 100
    start_time { Time.zone.now - 300 }
    end_time nil
    job_status 'in_progress'
    exhibit
    user
  end

  factory :recent_reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
    sequence(:items_reindexed_count)
    start_time { Time.zone.now - 86_400 }
    end_time { Time.zone.now - 86_100 }
    job_status 'succeeded'
    exhibit
    user
  end

  factory :failed_reindexing_log_entry, class: Spotlight::ReindexingLogEntry do
    items_reindexed_count 10
    start_time { Time.zone.parse('2017-01-10 23:00:00') }
    end_time { Time.zone.parse('2017-01-10 23:05:00') }
    job_status 'failed'
    exhibit
    user
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
blacklight-spotlight-2.2.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.1.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.2 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.0.rc6 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.0.rc5 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.0.rc4 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.0.rc3 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.0.rc2 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.0.0.rc1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-1.5.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-1.4.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-1.4.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-1.3.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-1.2.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-1.1.0 spec/factories/reindexing_log_entries.rb