diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-29 12:06:35 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-05 11:11:59 -0500 |
commit | fe13f110412d85c05dc68e5ee1db499f681bf722 (patch) | |
tree | 4a2d172bb5a490ac8cadbcf376fbf815393ef22b /spec/lib/banzai/filter/commit_reference_filter_spec.rb | |
parent | dc7939337e0d72d2391c3bbb3082d644a54195af (diff) | |
download | gitlab-ce-fe13f110412d85c05dc68e5ee1db499f681bf722.tar.gz |
Create and use project path helpers that only need a project, no namespace
Diffstat (limited to 'spec/lib/banzai/filter/commit_reference_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/commit_reference_filter_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/banzai/filter/commit_reference_filter_spec.rb b/spec/lib/banzai/filter/commit_reference_filter_spec.rb index c4d8d3b6682..f6893641481 100644 --- a/spec/lib/banzai/filter/commit_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/commit_reference_filter_spec.rb @@ -27,7 +27,7 @@ describe Banzai::Filter::CommitReferenceFilter, lib: true do expect(doc.css('a').first.text).to eq commit.short_id expect(doc.css('a').first.attr('href')) - .to eq urls.namespace_project_commit_url(project.namespace, project, reference) + .to eq urls.project_commit_url(project, reference) end end @@ -90,7 +90,7 @@ describe Banzai::Filter::CommitReferenceFilter, lib: true do link = doc.css('a').first.attr('href') expect(link).not_to match %r(https?://) - expect(link).to eq urls.namespace_project_commit_url(project.namespace, project, reference, only_path: true) + expect(link).to eq urls.project_commit_url(project, reference, only_path: true) end end @@ -175,13 +175,13 @@ describe Banzai::Filter::CommitReferenceFilter, lib: true do let(:namespace) { create(:namespace) } let(:project2) { create(:project, :public, :repository, namespace: namespace) } let(:commit) { project2.commit } - let(:reference) { urls.namespace_project_commit_url(project2.namespace, project2, commit.id) } + let(:reference) { urls.project_commit_url(project2, commit.id) } it 'links to a valid reference' do doc = reference_filter("See #{reference}") expect(doc.css('a').first.attr('href')) - .to eq urls.namespace_project_commit_url(project2.namespace, project2, commit.id) + .to eq urls.project_commit_url(project2, commit.id) end it 'links with adjacent text' do |