Commit bb3b7acb authored by Douwe Maan's avatar Douwe Maan

Don't always create a new import_state record from project factory

parent 2c601eb7
...@@ -69,43 +69,19 @@ FactoryBot.define do ...@@ -69,43 +69,19 @@ FactoryBot.define do
end end
trait :import_scheduled do trait :import_scheduled do
transient do import_status :scheduled
status :scheduled
end
before(:create) do |project, evaluator|
project.create_import_state(status: evaluator.status)
end
end end
trait :import_started do trait :import_started do
transient do import_status :started
status :started
end
before(:create) do |project, evaluator|
project.create_import_state(status: evaluator.status)
end
end end
trait :import_finished do trait :import_finished do
transient do import_status :finished
status :finished
end
before(:create) do |project, evaluator|
project.create_import_state(status: evaluator.status)
end
end end
trait :import_failed do trait :import_failed do
transient do import_status :failed
status :failed
end
before(:create) do |project, evaluator|
project.create_import_state(status: evaluator.status)
end
end end
trait :archived do trait :archived do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment