diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-02 16:35:04 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-04 18:33:26 +0300 |
commit | bddbcaefc2389e4c61763472cecbea150f10cd75 (patch) | |
tree | 38ba599beed53505dfca09fce7a890bf3b125bb3 /spec/factories/projects.rb | |
parent | 7603beffc916d06039cac63b223d8e6234b5d666 (diff) |
Backports every CE related change from ee-44542 to CE
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index aed5eab8044..a6128903546 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -69,19 +69,43 @@ FactoryBot.define do end trait :import_scheduled do - import_status :scheduled + transient do + status :scheduled + end + + before(:create) do |project, evaluator| + project.create_import_state(status: evaluator.status) + end end trait :import_started do - import_status :started + transient do + status :started + end + + before(:create) do |project, evaluator| + project.create_import_state(status: evaluator.status) + end end trait :import_finished do - import_status :finished + transient do + status :finished + end + + before(:create) do |project, evaluator| + project.create_import_state(status: evaluator.status) + end end trait :import_failed do - import_status :failed + transient do + status :failed + end + + before(:create) do |project, evaluator| + project.create_import_state(status: evaluator.status) + end end trait :archived do |