diff options
author | Robert Speicher <robert@gitlab.com> | 2018-05-08 01:30:13 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-05-08 01:30:13 +0300 |
commit | f9fcd2b4100d54255c2508439e9f924543aed7a7 (patch) | |
tree | a35df4ca43ca21ac3f98d36da28f147351afc398 /spec/factories/projects.rb | |
parent | b69ade5dd1eca99bff388240a184b6a579196f9d (diff) | |
parent | cfa798da5361128d9473ed170062586dea9525ae (diff) |
Merge branch 'dm-project-factory-import-state' into 'master'
Fix project factory `import_*` traits
Closes gitlab-ee#5904
See merge request gitlab-org/gitlab-ce!18780
Diffstat (limited to 'spec/factories/projects.rb')
-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 d129815aeac..16e025618a6 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 |