summaryrefslogtreecommitdiff
path: root/spec/helpers/issuables_helper_spec.rb
diff options
context:
space:
mode:
authorDennis Tang <dennis@dennistang.net>2018-04-19 14:43:20 +0000
committerRémy Coutable <remy@rymai.me>2018-04-19 14:43:20 +0000
commit49b85262c5a1944d7fdb50e43900a4adb13aba6c (patch)
tree9a24b282724d1fcfd9eec599db891a0cb2c6e517 /spec/helpers/issuables_helper_spec.rb
parent79905b5a0507bc75d6a960d9d85cce281e9041b3 (diff)
downloadgitlab-ce-49b85262c5a1944d7fdb50e43900a4adb13aba6c.tar.gz
Resolve "Improve tooltips of collapsed sidebars"
Diffstat (limited to 'spec/helpers/issuables_helper_spec.rb')
-rw-r--r--spec/helpers/issuables_helper_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb
index 4224cea4652..7b59fde999d 100644
--- a/spec/helpers/issuables_helper_spec.rb
+++ b/spec/helpers/issuables_helper_spec.rb
@@ -22,11 +22,15 @@ describe IssuablesHelper do
end
describe '#issuable_labels_tooltip' do
- it 'returns label text' do
+ it 'returns label text with no labels' do
+ expect(issuable_labels_tooltip([])).to eq("Labels")
+ end
+
+ it 'returns label text with labels within max limit' do
expect(issuable_labels_tooltip([label])).to eq(label.title)
end
- it 'returns label text' do
+ it 'returns label text with labels exceeding max limit' do
expect(issuable_labels_tooltip([label, label2], limit: 1)).to eq("#{label.title}, and 1 more")
end
end