diff options
Diffstat (limited to 'spec/workers/gitlab/github_import/stage/import_base_data_worker_spec.rb')
-rw-r--r-- | spec/workers/gitlab/github_import/stage/import_base_data_worker_spec.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/spec/workers/gitlab/github_import/stage/import_base_data_worker_spec.rb b/spec/workers/gitlab/github_import/stage/import_base_data_worker_spec.rb index 1ad027a007a..f3b706361e3 100644 --- a/spec/workers/gitlab/github_import/stage/import_base_data_worker_spec.rb +++ b/spec/workers/gitlab/github_import/stage/import_base_data_worker_spec.rb @@ -10,6 +10,8 @@ RSpec.describe Gitlab::GithubImport::Stage::ImportBaseDataWorker, feature_catego let(:importer) { double(:importer) } let(:client) { double(:client) } + it_behaves_like Gitlab::GithubImport::StageMethods + describe '#import' do it 'imports the base data of a project' do described_class::IMPORTERS.each do |klass| @@ -29,23 +31,5 @@ RSpec.describe Gitlab::GithubImport::Stage::ImportBaseDataWorker, feature_catego worker.import(client, project) end - - it 'raises an error' do - exception = StandardError.new('_some_error_') - - expect_next_instance_of(Gitlab::GithubImport::Importer::LabelsImporter) do |importer| - expect(importer).to receive(:execute).and_raise(exception) - end - expect(Gitlab::Import::ImportFailureService).to receive(:track) - .with( - project_id: project.id, - exception: exception, - error_source: described_class.name, - fail_import: true, - metrics: true - ).and_call_original - - expect { worker.import(client, project) }.to raise_error(StandardError) - end end end |