diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-25 10:03:55 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-27 10:39:05 +0100 |
commit | e08d947e77fa79b723bb1a32794f99d3c39ee463 (patch) | |
tree | d2ae3829f2ba93fa2e9bc998dbd457ba70e8e86a /spec/models | |
parent | c5de2ce742f7f2a472eadcd9a2e0d93992930180 (diff) | |
download | gitlab-ce-e08d947e77fa79b723bb1a32794f99d3c39ee463.tar.gz |
Use relative URL for Markdown references, except in mails.email-full-url
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_services/gitlab_issue_tracker_service_spec.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/models/project_services/gitlab_issue_tracker_service_spec.rb b/spec/models/project_services/gitlab_issue_tracker_service_spec.rb index bedb6ecf1b4..f94bef5c365 100644 --- a/spec/models/project_services/gitlab_issue_tracker_service_spec.rb +++ b/spec/models/project_services/gitlab_issue_tracker_service_spec.rb @@ -31,6 +31,7 @@ describe GitlabIssueTrackerService do context 'with absolute urls' do before do + GitlabIssueTrackerService.default_url_options[:script_name] = "/gitlab/root" @service = project.create_gitlab_issue_tracker_service(active: true) end @@ -39,13 +40,13 @@ describe GitlabIssueTrackerService do end it 'should give the correct path' do - expect(@service.project_url).to eq("http://localhost/#{project.path_with_namespace}/issues") - expect(@service.new_issue_url).to eq("http://localhost/#{project.path_with_namespace}/issues/new") - expect(@service.issue_url(432)).to eq("http://localhost/#{project.path_with_namespace}/issues/432") + expect(@service.project_url).to eq("http://localhost/gitlab/root/#{project.path_with_namespace}/issues") + expect(@service.new_issue_url).to eq("http://localhost/gitlab/root/#{project.path_with_namespace}/issues/new") + expect(@service.issue_url(432)).to eq("http://localhost/gitlab/root/#{project.path_with_namespace}/issues/432") end end - context 'with enabled relative urls' do + context 'with relative urls' do before do GitlabIssueTrackerService.default_url_options[:script_name] = "/gitlab/root" @service = project.create_gitlab_issue_tracker_service(active: true) @@ -56,9 +57,9 @@ describe GitlabIssueTrackerService do end it 'should give the correct path' do - expect(@service.project_url).to eq("http://localhost/gitlab/root/#{project.path_with_namespace}/issues") - expect(@service.new_issue_url).to eq("http://localhost/gitlab/root/#{project.path_with_namespace}/issues/new") - expect(@service.issue_url(432)).to eq("http://localhost/gitlab/root/#{project.path_with_namespace}/issues/432") + expect(@service.project_path).to eq("/gitlab/root/#{project.path_with_namespace}/issues") + expect(@service.new_issue_path).to eq("/gitlab/root/#{project.path_with_namespace}/issues/new") + expect(@service.issue_path(432)).to eq("/gitlab/root/#{project.path_with_namespace}/issues/432") end end end |