Commit bafd5379 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'zj-fix-slash-command-labels-ee' into 'master'

Chat slash commands show labels correctly

See merge request !1280
parents acc333bf dc9549a3
---
title: Chat slash commands show labels correctly
merge_request:
author:
......@@ -32,7 +32,7 @@ module Gitlab
},
{
title: "Labels",
value: @resource.labels.any? ? @resource.label_names : "_None_",
value: @resource.labels.any? ? @resource.label_names.join(', ') : "_None_",
short: true
},
{
......
......@@ -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) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment