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/concerns/gitlab/github_import/object_importer_spec.rb')
-rw-r--r--spec/workers/concerns/gitlab/github_import/object_importer_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb b/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb
index 5a32c1b40bb..ece0c5053cb 100644
--- a/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb
+++ b/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb
@@ -159,11 +159,13 @@ RSpec.describe Gitlab::GithubImport::ObjectImporter, :aggregate_failures do
.with(
project_id: project.id,
exception: exception,
- error_source: 'klass_name'
+ error_source: 'klass_name',
+ fail_import: false
)
.and_call_original
- worker.import(project, client, { 'number' => 10, 'github_id' => 1 })
+ expect { worker.import(project, client, { 'number' => 10, 'github_id' => 1 }) }
+ .to raise_error(exception)
expect(project.import_state.reload.status).to eq('started')
@@ -193,4 +195,12 @@ RSpec.describe Gitlab::GithubImport::ObjectImporter, :aggregate_failures do
end
end
end
+
+ describe '#increment_object_counter?' do
+ let(:issue) { double(:issue, pull_request?: true) }
+
+ it 'returns true' do
+ expect(worker).to be_increment_object_counter(issue)
+ end
+ end
end