2021-06-08 01:23:25 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :bulk_import_export, class: 'BulkImports::Export', traits: %i[started] do
|
|
|
|
group
|
|
|
|
relation { 'labels' }
|
|
|
|
|
|
|
|
trait :started do
|
|
|
|
status { 0 }
|
|
|
|
|
|
|
|
sequence(:jid) { |n| "bulk_import_export_#{n}" }
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :finished do
|
|
|
|
status { 1 }
|
|
|
|
|
|
|
|
sequence(:jid) { |n| "bulk_import_export_#{n}" }
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :failed do
|
|
|
|
status { -1 }
|
|
|
|
end
|
2023-07-09 08:55:56 +05:30
|
|
|
|
|
|
|
trait :batched do
|
|
|
|
batched { true }
|
|
|
|
end
|
2021-06-08 01:23:25 +05:30
|
|
|
end
|
|
|
|
end
|