diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-02-21 09:53:44 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-02-21 14:20:08 +0100 |
commit | 63bd79f594272d98ce022685f26a47ce0afae9d4 (patch) | |
tree | eaecca72bb9b8afd15512b2461fa156e09944b70 /spec | |
parent | b596dd8fedd9dc8f9487e1e67a52a7b211bd956b (diff) | |
download | gitlab-ce-63bd79f594272d98ce022685f26a47ce0afae9d4.tar.gz |
Chat slash commands show labels correctlyzj-fix-slash-command-labels
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb b/spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb index 5b678d31fce..3916fc704a4 100644 --- a/spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb +++ b/spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb @@ -26,6 +26,21 @@ describe Gitlab::ChatCommands::Presenters::IssueShow do end end + context 'with labels' do + let(:label) { create(:label, project: project, title: 'mep') } + let(:label1) { create(:label, project: project, title: 'mop') } + + before do + issue.labels << [label, label1] + end + + it 'shows the labels' do + labels = attachment[:fields].find { |f| f[:title] == 'Labels' } + + expect(labels[:value]).to eq("mep, mop") + end + end + context 'confidential issue' do let(:issue) { create(:issue, project: project) } |