diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 09:10:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 09:10:09 +0000 |
commit | 9bd7e5997e1452257e3861555c151764cf0574d7 (patch) | |
tree | a5c429831f37884520e0dfbacfc89bb616dc5577 /spec/services/preview_markdown_service_spec.rb | |
parent | 4b41b57abf3ad9c2e0e81b3804cb01af6f879349 (diff) | |
download | gitlab-ce-9bd7e5997e1452257e3861555c151764cf0574d7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/preview_markdown_service_spec.rb')
-rw-r--r-- | spec/services/preview_markdown_service_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/services/preview_markdown_service_spec.rb b/spec/services/preview_markdown_service_spec.rb index 53f8f5b7253..fe1ab6b1d58 100644 --- a/spec/services/preview_markdown_service_spec.rb +++ b/spec/services/preview_markdown_service_spec.rb @@ -172,4 +172,24 @@ RSpec.describe PreviewMarkdownService do expect(result[:commands]).to eq 'Tags this commit to v1.2.3 with "Stable release".' end end + + context 'note with multiple quick actions' do + let(:issue) { create(:issue, project: project) } + let(:params) do + { + text: "/confidential\n/due 2001-12-31\n/estimate 2y\n/assign #{user.to_reference}", + target_type: 'Issue', + target_id: issue.id + } + end + + let(:service) { described_class.new(project, user, params) } + + it 'renders quick actions on multiple lines' do + result = service.execute + + expect(result[:commands]).to eq "Makes this issue confidential.<br>Sets the due date to Dec 31, 2001.<br>" \ + "Sets time estimate to 2y.<br>Assigns #{user.to_reference}." + end + end end |