diff options
author | Alejandro RodrÃguez <alejandroluis24@gmail.com> | 2016-04-07 03:37:56 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejandroluis24@gmail.com> | 2016-04-21 04:12:43 +0300 |
commit | 30d1d47d1da729319a3e71bd5599c473fc926565 (patch) | |
tree | d78a7027dbe3d0e7c469eeee77bfc7fae4142311 /spec/lib/banzai | |
parent | 0f925714d04a4d2e86db3a752fc8c1fc45da2214 (diff) |
Using project `path_with_namespace` in milestone's cross project references link text
Diffstat (limited to 'spec/lib/banzai')
-rw-r--r-- | spec/lib/banzai/filter/milestone_reference_filter_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb index ac3e6e4e536..bdf48eabb0e 100644 --- a/spec/lib/banzai/filter/milestone_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/milestone_reference_filter_spec.rb @@ -160,7 +160,7 @@ describe Banzai::Filter::MilestoneReferenceFilter, lib: true do describe 'cross project milestone references' do let(:another_project) { create(:empty_project, :public) } - let(:project_name) { another_project.name_with_namespace } + let(:project_path) { another_project.path_with_namespace } let(:milestone) { create(:milestone, project: another_project) } let(:reference) { milestone.to_reference(project) } @@ -174,13 +174,13 @@ describe Banzai::Filter::MilestoneReferenceFilter, lib: true do end it 'contains cross project content' do - expect(result.css('a').first.text).to eq "#{milestone.name} in #{project_name}" + expect(result.css('a').first.text).to eq "#{milestone.name} in #{project_path}" end it 'escapes the name attribute' do allow_any_instance_of(Milestone).to receive(:title).and_return(%{"></a>whatever<a title="}) doc = reference_filter("See #{reference}") - expect(doc.css('a').first.text).to eq "#{milestone.name} in #{project_name}" + expect(doc.css('a').first.text).to eq "#{milestone.name} in #{project_path}" end end end |