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/services/preview_markdown_service_spec.rb')
-rw-r--r--spec/services/preview_markdown_service_spec.rb20
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