diff options
Diffstat (limited to 'spec/lib/gitlab/github_import/importer')
5 files changed, 16 insertions, 12 deletions
diff --git a/spec/lib/gitlab/github_import/importer/diff_note_importer_spec.rb b/spec/lib/gitlab/github_import/importer/diff_note_importer_spec.rb index 321ad7d3238..8eeb2332131 100644 --- a/spec/lib/gitlab/github_import/importer/diff_note_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/diff_note_importer_spec.rb @@ -181,8 +181,10 @@ RSpec.describe Gitlab::GithubImport::Importer::DiffNoteImporter, :aggregate_fail expect(Gitlab::GithubImport::Logger) .to receive(:warn) .with( - message: "Validation failed: Line code can't be blank, Line code must be a valid line code, Position is incomplete", - 'error.class': 'Gitlab::GithubImport::Importer::DiffNoteImporter::DiffNoteCreationError' + { + message: "Validation failed: Line code can't be blank, Line code must be a valid line code, Position is incomplete", + 'error.class': 'Gitlab::GithubImport::Importer::DiffNoteImporter::DiffNoteCreationError' + } ) expect { subject.execute } @@ -204,8 +206,10 @@ RSpec.describe Gitlab::GithubImport::Importer::DiffNoteImporter, :aggregate_fail expect(Gitlab::GithubImport::Logger) .to receive(:warn) .with( - message: 'Failed to create diff note file', - 'error.class': 'DiffNote::NoteDiffFileCreationError' + { + message: 'Failed to create diff note file', + 'error.class': 'DiffNote::NoteDiffFileCreationError' + } ) expect { subject.execute } diff --git a/spec/lib/gitlab/github_import/importer/pull_requests_reviews_importer_spec.rb b/spec/lib/gitlab/github_import/importer/pull_requests_reviews_importer_spec.rb index c5fa67e50aa..0eb86feb040 100644 --- a/spec/lib/gitlab/github_import/importer/pull_requests_reviews_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/pull_requests_reviews_importer_spec.rb @@ -48,7 +48,7 @@ RSpec.describe Gitlab::GithubImport::Importer::PullRequestsReviewsImporter do expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:pull_request_reviews, 'github/repo', merge_request.iid, page: 1) + .with(:pull_request_reviews, 'github/repo', merge_request.iid, { page: 1 }) .and_yield(page) expect { |b| subject.each_object_to_import(&b) } @@ -67,7 +67,7 @@ RSpec.describe Gitlab::GithubImport::Importer::PullRequestsReviewsImporter do expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:pull_request_reviews, 'github/repo', merge_request.iid, page: 2) + .with(:pull_request_reviews, 'github/repo', merge_request.iid, { page: 2 }) subject.each_object_to_import {} end diff --git a/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb index 8c71d7d0ed7..471302cb31b 100644 --- a/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/single_endpoint_diff_notes_importer_spec.rb @@ -33,7 +33,7 @@ RSpec.describe Gitlab::GithubImport::Importer::SingleEndpointDiffNotesImporter d expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:pull_request_comments, 'github/repo', merge_request.iid, page: 1) + .with(:pull_request_comments, 'github/repo', merge_request.iid, { page: 1 }) .and_yield(page) expect { |b| subject.each_object_to_import(&b) }.to yield_with_args(note) @@ -56,7 +56,7 @@ RSpec.describe Gitlab::GithubImport::Importer::SingleEndpointDiffNotesImporter d expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:pull_request_comments, 'github/repo', merge_request.iid, page: 2) + .with(:pull_request_comments, 'github/repo', merge_request.iid, { page: 2 }) subject.each_object_to_import {} end diff --git a/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb index 8d8f2730880..d769f4fdcf5 100644 --- a/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/single_endpoint_issue_notes_importer_spec.rb @@ -32,7 +32,7 @@ RSpec.describe Gitlab::GithubImport::Importer::SingleEndpointIssueNotesImporter expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:issue_comments, 'github/repo', issue.iid, page: 1) + .with(:issue_comments, 'github/repo', issue.iid, { page: 1 }) .and_yield(page) expect { |b| subject.each_object_to_import(&b) }.to yield_with_args(note) @@ -55,7 +55,7 @@ RSpec.describe Gitlab::GithubImport::Importer::SingleEndpointIssueNotesImporter expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:issue_comments, 'github/repo', issue.iid, page: 2) + .with(:issue_comments, 'github/repo', issue.iid, { page: 2 }) subject.each_object_to_import {} end diff --git a/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb b/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb index b8282212a90..1dcc466d34c 100644 --- a/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/single_endpoint_merge_request_notes_importer_spec.rb @@ -33,7 +33,7 @@ RSpec.describe Gitlab::GithubImport::Importer::SingleEndpointMergeRequestNotesIm expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:issue_comments, 'github/repo', merge_request.iid, page: 1) + .with(:issue_comments, 'github/repo', merge_request.iid, { page: 1 }) .and_yield(page) expect { |b| subject.each_object_to_import(&b) }.to yield_with_args(note) @@ -56,7 +56,7 @@ RSpec.describe Gitlab::GithubImport::Importer::SingleEndpointMergeRequestNotesIm expect(client) .to receive(:each_page) .exactly(:once) # ensure to be cached on the second call - .with(:issue_comments, 'github/repo', merge_request.iid, page: 2) + .with(:issue_comments, 'github/repo', merge_request.iid, { page: 2 }) subject.each_object_to_import {} end |