diff options
author | Phil Hughes <me@iamphill.com> | 2016-08-19 15:36:49 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-08-19 15:36:49 +0100 |
commit | d1b987fd05ef650cfb227da5828a1cd4fc811436 (patch) | |
tree | b764864dfbe090d1edf0d2fc247d99aa49fc1c4f /spec/helpers/issuables_helper_spec.rb | |
parent | bcf304b04ac4bd7e7863421f84a388ab4039b80f (diff) | |
download | gitlab-ce-d1b987fd05ef650cfb227da5828a1cd4fc811436.tar.gz |
Changed file name
Updated spec HAML
Diffstat (limited to 'spec/helpers/issuables_helper_spec.rb')
-rw-r--r-- | spec/helpers/issuables_helper_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb new file mode 100644 index 00000000000..2dd2eab0524 --- /dev/null +++ b/spec/helpers/issuables_helper_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +describe IssuablesHelper do + let(:label) { build_stubbed(:label) } + let(:label2) { build_stubbed(:label) } + + context 'label tooltip' do + it 'returns label text' do + expect(issuable_labels_tooltip([label])).to eq(label.title) + end + + it 'returns label text' do + expect(issuable_labels_tooltip([label, label2], limit: 1)).to eq("#{label.title}, and 1 more") + end + end +end |