Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/groups/import_export/import_service_spec.rb')
-rw-r--r--spec/services/groups/import_export/import_service_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/groups/import_export/import_service_spec.rb b/spec/services/groups/import_export/import_service_spec.rb
index ad5c4364deb..292f2e2b86b 100644
--- a/spec/services/groups/import_export/import_service_spec.rb
+++ b/spec/services/groups/import_export/import_service_spec.rb
@@ -7,6 +7,10 @@ RSpec.describe Groups::ImportExport::ImportService do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
+ before do
+ allow(GroupImportWorker).to receive(:with_status).and_return(GroupImportWorker)
+ end
+
context 'when the job can be successfully scheduled' do
subject(:import_service) { described_class.new(group: group, user: user) }
@@ -20,6 +24,8 @@ RSpec.describe Groups::ImportExport::ImportService do
end
it 'enqueues an import job' do
+ allow(GroupImportWorker).to receive(:with_status).and_return(GroupImportWorker)
+
expect(GroupImportWorker).to receive(:perform_async).with(user.id, group.id)
import_service.async_execute