diff options
Diffstat (limited to 'spec/workers/concerns/gitlab')
-rw-r--r-- | spec/workers/concerns/gitlab/github_import/object_importer_spec.rb | 30 | ||||
-rw-r--r-- | spec/workers/concerns/gitlab/github_import/stage_methods_spec.rb | 42 |
2 files changed, 44 insertions, 28 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 b5252294b27..3cd82b8bf4d 100644 --- a/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb +++ b/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb @@ -83,19 +83,23 @@ RSpec.describe Gitlab::GithubImport::ObjectImporter, :aggregate_failures do expect(Gitlab::GithubImport::Logger) .to receive(:info) .with( - github_identifiers: github_identifiers, - message: 'starting importer', - project_id: project.id, - importer: 'klass_name' + { + github_identifiers: github_identifiers, + message: 'starting importer', + project_id: project.id, + importer: 'klass_name' + } ) expect(Gitlab::GithubImport::Logger) .to receive(:info) .with( - github_identifiers: github_identifiers, - message: 'importer finished', - project_id: project.id, - importer: 'klass_name' + { + github_identifiers: github_identifiers, + message: 'importer finished', + project_id: project.id, + importer: 'klass_name' + } ) worker.import(project, client, { 'number' => 10, 'github_id' => 1 }) @@ -120,10 +124,12 @@ RSpec.describe Gitlab::GithubImport::ObjectImporter, :aggregate_failures do expect(Gitlab::GithubImport::Logger) .to receive(:info) .with( - github_identifiers: github_identifiers, - message: 'starting importer', - project_id: project.id, - importer: 'klass_name' + { + github_identifiers: github_identifiers, + message: 'starting importer', + project_id: project.id, + importer: 'klass_name' + } ) expect(Gitlab::Import::ImportFailureService) diff --git a/spec/workers/concerns/gitlab/github_import/stage_methods_spec.rb b/spec/workers/concerns/gitlab/github_import/stage_methods_spec.rb index aeb86f5aa8c..1e088929f66 100644 --- a/spec/workers/concerns/gitlab/github_import/stage_methods_spec.rb +++ b/spec/workers/concerns/gitlab/github_import/stage_methods_spec.rb @@ -38,17 +38,21 @@ RSpec.describe Gitlab::GithubImport::StageMethods do expect(Gitlab::GithubImport::Logger) .to receive(:info) .with( - message: 'starting stage', - project_id: project.id, - import_stage: 'DummyStage' + { + message: 'starting stage', + project_id: project.id, + import_stage: 'DummyStage' + } ) expect(Gitlab::GithubImport::Logger) .to receive(:info) .with( - message: 'stage finished', - project_id: project.id, - import_stage: 'DummyStage' + { + message: 'stage finished', + project_id: project.id, + import_stage: 'DummyStage' + } ) worker.perform(project.id) @@ -70,18 +74,22 @@ RSpec.describe Gitlab::GithubImport::StageMethods do expect(Gitlab::GithubImport::Logger) .to receive(:info) .with( - message: 'starting stage', - project_id: project.id, - import_stage: 'DummyStage' + { + message: 'starting stage', + project_id: project.id, + import_stage: 'DummyStage' + } ) expect(Gitlab::Import::ImportFailureService) .to receive(:track) .with( - project_id: project.id, - exception: exception, - error_source: 'DummyStage', - fail_import: false + { + project_id: project.id, + exception: exception, + error_source: 'DummyStage', + fail_import: false + } ).and_call_original expect { worker.perform(project.id) } @@ -125,9 +133,11 @@ RSpec.describe Gitlab::GithubImport::StageMethods do expect(Gitlab::GithubImport::Logger) .to receive(:info) .with( - message: 'starting stage', - project_id: project.id, - import_stage: 'DummyStage' + { + message: 'starting stage', + project_id: project.id, + import_stage: 'DummyStage' + } ) expect(Gitlab::Import::ImportFailureService) |