summaryrefslogtreecommitdiff
path: root/spec/models/project_services/gitlab_issue_tracker_service_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-24 17:20:05 +0100
committerDouwe Maan <douwe@gitlab.com>2015-03-27 10:39:05 +0100
commitc5de2ce742f7f2a472eadcd9a2e0d93992930180 (patch)
treedcb7ac46064672d20d3ff3f70e87545218a52882 /spec/models/project_services/gitlab_issue_tracker_service_spec.rb
parent28592ae46767443dc0f3723bd4f05f360bab8f41 (diff)
downloadgitlab-ce-c5de2ce742f7f2a472eadcd9a2e0d93992930180.tar.gz
Return full URLs from GitLabIssueTrackerService.
Diffstat (limited to 'spec/models/project_services/gitlab_issue_tracker_service_spec.rb')
-rw-r--r--spec/models/project_services/gitlab_issue_tracker_service_spec.rb14
1 files changed, 7 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 959044dc727..bedb6ecf1b4 100644
--- a/spec/models/project_services/gitlab_issue_tracker_service_spec.rb
+++ b/spec/models/project_services/gitlab_issue_tracker_service_spec.rb
@@ -39,15 +39,15 @@ describe GitlabIssueTrackerService do
end
it 'should give the correct path' do
- expect(@service.project_url).to eq("/#{project.path_with_namespace}/issues")
- expect(@service.new_issue_url).to eq("/#{project.path_with_namespace}/issues/new")
- expect(@service.issue_url(432)).to eq("/#{project.path_with_namespace}/issues/432")
+ 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")
end
end
context 'with enabled relative urls' do
before do
- Settings.gitlab.stub(:relative_url_root).and_return("/gitlab/root")
+ GitlabIssueTrackerService.default_url_options[:script_name] = "/gitlab/root"
@service = project.create_gitlab_issue_tracker_service(active: true)
end
@@ -56,9 +56,9 @@ describe GitlabIssueTrackerService do
end
it 'should give the correct path' do
- expect(@service.project_url).to eq("/gitlab/root/#{project.path_with_namespace}/issues")
- expect(@service.new_issue_url).to eq("/gitlab/root/#{project.path_with_namespace}/issues/new")
- expect(@service.issue_url(432)).to eq("/gitlab/root/#{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
end