diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /spec/services/preview_markdown_service_spec.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'spec/services/preview_markdown_service_spec.rb')
-rw-r--r-- | spec/services/preview_markdown_service_spec.rb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/services/preview_markdown_service_spec.rb b/spec/services/preview_markdown_service_spec.rb index 6fa44310ae5..f6aca9970c8 100644 --- a/spec/services/preview_markdown_service_spec.rb +++ b/spec/services/preview_markdown_service_spec.rb @@ -28,9 +28,11 @@ RSpec.describe PreviewMarkdownService, feature_category: :team_planning do let(:text) { "```suggestion\nfoo\n```" } let(:params) do - suggestion_params.merge(text: text, - target_type: 'MergeRequest', - target_id: merge_request.iid) + suggestion_params.merge( + text: text, + target_type: 'MergeRequest', + target_id: merge_request.iid + ) end let(:service) { described_class.new(project, user, params) } @@ -52,15 +54,16 @@ RSpec.describe PreviewMarkdownService, feature_category: :team_planning do end it 'returns suggestions referenced in text' do - position = Gitlab::Diff::Position.new(new_path: path, - new_line: line, - diff_refs: diff_refs) + position = Gitlab::Diff::Position.new(new_path: path, new_line: line, diff_refs: diff_refs) expect(Gitlab::Diff::SuggestionsParser) .to receive(:parse) - .with(text, position: position, - project: merge_request.project, - supports_suggestion: true) + .with( + text, + position: position, + project: merge_request.project, + supports_suggestion: true + ) .and_call_original result = service.execute |