diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-22 15:05:52 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-22 15:05:52 +0200 |
commit | 97c42df3b804a37e659c3cda6bd8a52570f31366 (patch) | |
tree | 97c38db7f71a93a7b0db5ca2c682d6d17479cbdb /spec/services/preview_markdown_service_spec.rb | |
parent | 3833f1dd84dfec844443a5b1d9ba2bd2b911c0bc (diff) | |
parent | 11716f310dcc495600f5a17e08456a1abb296482 (diff) | |
download | gitlab-ce-97c42df3b804a37e659c3cda6bd8a52570f31366.tar.gz |
Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch28717-additional-metrics-review-branch
Diffstat (limited to 'spec/services/preview_markdown_service_spec.rb')
-rw-r--r-- | spec/services/preview_markdown_service_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/services/preview_markdown_service_spec.rb b/spec/services/preview_markdown_service_spec.rb index b2fb5c91313..4fd9cb23ae1 100644 --- a/spec/services/preview_markdown_service_spec.rb +++ b/spec/services/preview_markdown_service_spec.rb @@ -19,24 +19,24 @@ describe PreviewMarkdownService do end end - context 'new note with slash commands' do + context 'new note with quick actions' do let(:issue) { create(:issue, project: project) } let(:params) do { text: "Please do it\n/assign #{user.to_reference}", - slash_commands_target_type: 'Issue', - slash_commands_target_id: issue.id + quick_actions_target_type: 'Issue', + quick_actions_target_id: issue.id } end let(:service) { described_class.new(project, user, params) } - it 'removes slash commands from text' do + it 'removes quick actions from text' do result = service.execute expect(result[:text]).to eq 'Please do it' end - it 'explains slash commands effect' do + it 'explains quick actions effect' do result = service.execute expect(result[:commands]).to eq "Assigns #{user.to_reference}." @@ -47,21 +47,21 @@ describe PreviewMarkdownService do let(:params) do { text: "My work\n/estimate 2y", - slash_commands_target_type: 'MergeRequest' + quick_actions_target_type: 'MergeRequest' } end let(:service) { described_class.new(project, user, params) } - it 'removes slash commands from text' do + it 'removes quick actions from text' do result = service.execute expect(result[:text]).to eq 'My work' end - it 'explains slash commands effect' do + it 'explains quick actions effect' do result = service.execute expect(result[:commands]).to eq 'Sets time estimate to 2y.' - end + end end end |