diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-05-07 19:25:51 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-05-07 19:25:51 +0200 |
commit | bb3b7acb068bba6b841c453b7edac441c86c2650 (patch) | |
tree | bf14ab5063a04554eef2a317e849051f46f338c7 /spec | |
parent | 2c601eb7871a5cd3daa8e91653ad752137ac2b2d (diff) | |
download | gitlab-ce-bb3b7acb068bba6b841c453b7edac441c86c2650.tar.gz |
Don't always create a new import_state record from project factory
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/projects.rb | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 9ab57af1c60..522e759d8d6 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -69,43 +69,19 @@ FactoryBot.define do end trait :import_scheduled do - transient do - status :scheduled - end - - before(:create) do |project, evaluator| - project.create_import_state(status: evaluator.status) - end + import_status :scheduled end trait :import_started do - transient do - status :started - end - - before(:create) do |project, evaluator| - project.create_import_state(status: evaluator.status) - end + import_status :started end trait :import_finished do - transient do - status :finished - end - - before(:create) do |project, evaluator| - project.create_import_state(status: evaluator.status) - end + import_status :finished end trait :import_failed do - transient do - status :failed - end - - before(:create) do |project, evaluator| - project.create_import_state(status: evaluator.status) - end + import_status :failed end trait :archived do |