Change content of cross project label

This commit is contained in:
Grzegorz Bizon 2016-03-03 09:31:07 +01:00
parent d49c8e8e3d
commit 34769efa79
2 changed files with 5 additions and 5 deletions

View File

@ -64,8 +64,8 @@ module LabelsHelper
end
def render_colored_cross_project_label(label)
label_suffix = label.project.name
label_suffix = " <i>&laquo; #{label_suffix}</i>"
label_suffix = label.project.name_with_namespace
label_suffix = " <i>in #{label_suffix}</i>"
render_colored_label(label, label_suffix)
end

View File

@ -178,8 +178,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end
describe 'cross project label references' do
let(:project_name) { 'Some project' }
let(:another_project) { create(:empty_project, :public, name: project_name) }
let(:another_project) { create(:empty_project, :public) }
let(:project_name) { another_project.name_with_namespace }
let(:label) { create(:label, project: another_project, color: '#00ff00') }
let(:reference) { label.to_reference(project) }
@ -198,7 +198,7 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
end
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