diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-26 12:52:00 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-03 12:41:11 +0300 |
commit | 62dcdef969fe29f43abfbe2653e73ab09b2d1bf6 (patch) | |
tree | d8c1b1a2679335c923c1c8b676aba53bdd3640a4 /spec/lib/banzai/filter/label_reference_filter_spec.rb | |
parent | 7183a7da6dbe5d2faf2ae03dfe4652ca6ed6dfde (diff) |
Improve cross project label look and feel
Diffstat (limited to 'spec/lib/banzai/filter/label_reference_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/label_reference_filter_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/lib/banzai/filter/label_reference_filter_spec.rb b/spec/lib/banzai/filter/label_reference_filter_spec.rb index 96a403f2694..8786095fbe4 100644 --- a/spec/lib/banzai/filter/label_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/label_reference_filter_spec.rb @@ -178,7 +178,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do end describe 'cross project label references' do - let(:another_project) { create(:empty_project, :public) } + let(:project_name) { 'Some project' } + let(:another_project) { create(:empty_project, :public, name: project_name) } let(:label) { create(:label, project: another_project, color: '#00ff00') } let(:reference) { label.to_reference(project) } @@ -192,7 +193,12 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do end it 'has valid color' do - expect(result.css('a span').first.attr('style')).to match /background-color: #00ff00/ + expect(result.css('a span').first.attr('style')) + .to match /background-color: #00ff00/ + end + + it 'contains cross project content' do + expect(result.css('a').first.text).to eq "#{label.name} « #{project_name}" end end end |