reindexing_tasks.rb 333 Bytes
Newer Older
1 2 3 4 5 6
# frozen_string_literal: true

FactoryBot.define do
  factory :elastic_reindexing_task, class: 'Elastic::ReindexingTask' do
    state { :initial }
    in_progress { true }
7 8 9 10 11 12

    trait :with_subtask do
      after(:create) do |task|
        create :elastic_reindexing_subtask, elastic_reindexing_task: task
      end
    end
13 14
  end
end