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/workers/gitlab/github_import/stage/import_pull_requests_worker_spec.rb')
-rw-r--r--spec/workers/gitlab/github_import/stage/import_pull_requests_worker_spec.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/spec/workers/gitlab/github_import/stage/import_pull_requests_worker_spec.rb b/spec/workers/gitlab/github_import/stage/import_pull_requests_worker_spec.rb
index 9b2cfead684..f9b4a8a99f0 100644
--- a/spec/workers/gitlab/github_import/stage/import_pull_requests_worker_spec.rb
+++ b/spec/workers/gitlab/github_import/stage/import_pull_requests_worker_spec.rb
@@ -11,6 +11,8 @@ RSpec.describe Gitlab::GithubImport::Stage::ImportPullRequestsWorker, feature_ca
let(:importer) { double(:importer) }
let(:client) { double(:client) }
+ it_behaves_like Gitlab::GithubImport::StageMethods
+
describe '#import' do
context 'with pull requests' do
it 'imports all the pull requests and allocates internal iids' do
@@ -101,26 +103,4 @@ RSpec.describe Gitlab::GithubImport::Stage::ImportPullRequestsWorker, feature_ca
end
end
end
-
- it 'raises an error' do
- exception = StandardError.new('_some_error_')
-
- expect(client).to receive(:each_object).with(
- :pulls, project.import_source, options
- ).and_return([{ number: 4 }].each)
-
- expect_next_instance_of(Gitlab::GithubImport::Importer::PullRequestsImporter) 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