BigW Consortium Gitlab

Commit 34769efa by Grzegorz Bizon

Change content of cross project label

parent d49c8e8e
...@@ -64,8 +64,8 @@ module LabelsHelper ...@@ -64,8 +64,8 @@ module LabelsHelper
end end
def render_colored_cross_project_label(label) def render_colored_cross_project_label(label)
label_suffix = label.project.name label_suffix = label.project.name_with_namespace
label_suffix = " <i>&laquo; #{label_suffix}</i>" label_suffix = " <i>in #{label_suffix}</i>"
render_colored_label(label, label_suffix) render_colored_label(label, label_suffix)
end end
......
...@@ -178,8 +178,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do ...@@ -178,8 +178,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end end
describe 'cross project label references' do describe 'cross project label references' do
let(:project_name) { 'Some project' } let(:another_project) { create(:empty_project, :public) }
let(:another_project) { create(:empty_project, :public, name: project_name) } let(:project_name) { another_project.name_with_namespace }
let(:label) { create(:label, project: another_project, color: '#00ff00') } let(:label) { create(:label, project: another_project, color: '#00ff00') }
let(:reference) { label.to_reference(project) } let(:reference) { label.to_reference(project) }
...@@ -198,7 +198,7 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do ...@@ -198,7 +198,7 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end end
it 'contains cross project content' do it 'contains cross project content' do
expect(result.css('a').first.text).to eq "#{label.name} « #{project_name}" expect(result.css('a').first.text).to eq "#{label.name} in #{project_name}"
end end
end end
end end
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