Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issuables_helper_spec.rb « helpers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2dd2eab0524369b8e13ea8c17b5005ca0942894d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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