Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/gitlab_routing_helper_spec.rb')
-rw-r--r--spec/helpers/gitlab_routing_helper_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/helpers/gitlab_routing_helper_spec.rb b/spec/helpers/gitlab_routing_helper_spec.rb
index 1955927e2df..4def04f4284 100644
--- a/spec/helpers/gitlab_routing_helper_spec.rb
+++ b/spec/helpers/gitlab_routing_helper_spec.rb
@@ -121,6 +121,16 @@ describe GitlabRoutingHelper do
it 'matches the Rails download path' do
expect(fast_download_project_job_artifacts_path(project, job)).to eq(download_project_job_artifacts_path(project, job))
end
+
+ context 'when given parameters' do
+ it 'adds them to the path' do
+ expect(
+ fast_download_project_job_artifacts_path(project, job, file_type: :dast)
+ ).to eq(
+ download_project_job_artifacts_path(project, job, file_type: :dast)
+ )
+ end
+ end
end
describe '#fast_keep_project_job_artifacts_path' do
@@ -228,5 +238,25 @@ describe GitlabRoutingHelper do
expect(gitlab_toggle_award_emoji_snippet_url(personal_snippet)).to eq("http://test.host/snippets/#{personal_snippet.id}/toggle_award_emoji")
end
end
+
+ describe '#gitlab_dashboard_snippets_path' do
+ it 'returns the personal snippets dashboard path' do
+ expect(gitlab_dashboard_snippets_path(personal_snippet)).to eq("/dashboard/snippets")
+ end
+
+ it 'returns the project snippets dashboard path' do
+ expect(gitlab_dashboard_snippets_path(project_snippet)).to eq("/#{project_snippet.project.full_path}/snippets")
+ end
+ end
+ end
+
+ context 'wikis' do
+ let(:wiki) { create(:project_wiki) }
+
+ describe '#wiki_page_path' do
+ it 'returns the url for the wiki page' do
+ expect(wiki_page_path(wiki, 'page')).to eq("/#{wiki.project.full_path}/-/wikis/page")
+ end
+ end
end
end