Sha256: e33207c5019bc6c04e0edbbd41d0c90d8685e668b1587bf6967a7b5199d70df4

Contents?: true

Size: 1.53 KB

Versions: 18

Compression:

Stored size: 1.53 KB

Contents

# frozen_string_literal: true

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

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-3.0.0.alpha.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.13.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.12.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.12.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.11.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.10.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.9.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.8.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.7.2 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.7.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.7.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.6.1.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.6.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.6.0 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.5.2 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.5.1 spec/factories/reindexing_log_entries.rb
blacklight-spotlight-2.5.0 spec/factories/reindexing_log_entries.rb