diff options
author | James Lopez <james@jameslopez.es> | 2018-06-25 16:10:26 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-07-06 16:46:18 +0300 |
commit | a2bf1641546a1d3eeb3e9f44734854f655c0adef (patch) | |
tree | 0652c20a92513330aa09c4a2ec9adbfaeb3a6494 /spec/factories/projects.rb | |
parent | b0fa01fce3822da94aee6264829841996beb6df3 (diff) |
Update Import/Export to use object storage (based on aa feature flag)
Diffstat (limited to 'spec/factories/projects.rb')
-rw-r--r-- | spec/factories/projects.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index f6b05bac0e8..f77ded23b18 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -103,6 +103,22 @@ FactoryBot.define do end trait :with_export do + before(:create) do |_project, _evaluator| + allow(Feature).to receive(:enabled?).with(:import_export_object_storage) { false } + allow(Feature).to receive(:enabled?).with('import_export_object_storage') { false } + end + + after(:create) do |project, _evaluator| + ProjectExportWorker.new.perform(project.creator.id, project.id) + end + end + + trait :with_object_export do + before(:create) do |_project, _evaluator| + allow(Feature).to receive(:enabled?).with(:import_export_object_storage) { true } + allow(Feature).to receive(:enabled?).with('import_export_object_storage') { true } + end + after(:create) do |project, evaluator| ProjectExportWorker.new.perform(project.creator.id, project.id) end |