diff options
Diffstat (limited to 'spec/support/shared_examples/lib/gitlab/bitbucket_server_import/object_import_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/lib/gitlab/bitbucket_server_import/object_import_shared_examples.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/shared_examples/lib/gitlab/bitbucket_server_import/object_import_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/bitbucket_server_import/object_import_shared_examples.rb index 4eae8632467..45248f57683 100644 --- a/spec/support/shared_examples/lib/gitlab/bitbucket_server_import/object_import_shared_examples.rb +++ b/spec/support/shared_examples/lib/gitlab/bitbucket_server_import/object_import_shared_examples.rb @@ -65,5 +65,17 @@ RSpec.shared_examples Gitlab::BitbucketServerImport::ObjectImporter do it_behaves_like 'notifies the waiter' end + + context 'when project import has failed' do + let_it_be(:project_id) { create(:project, :import_failed).id } + + it 'does not call the importer' do + expect_next(worker.importer_class).not_to receive(:execute) + + worker.perform(project_id, {}, waiter_key) + end + + it_behaves_like 'notifies the waiter' + end end end |