diff options
author | Artem Sidorenko <artem@posteo.de> | 2016-05-03 17:33:43 +0200 |
---|---|---|
committer | Artem Sidorenko <artem@posteo.de> | 2016-05-09 11:50:23 +0200 |
commit | 14b36f91d9d803850f59fe49961d6d6a9d540aab (patch) | |
tree | e2071f037b19010438c8d758f87ac355096d4fe7 /spec | |
parent | 0a103e983cccc9bb9a7a28fb4eacff8d624010f8 (diff) | |
download | gitlab-ce-14b36f91d9d803850f59fe49961d6d6a9d540aab.tar.gz |
Use the proper GitLab URL for links in Wiki
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/url_builder_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/project_wiki_spec.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb index bf11472407a..c8d3bc01395 100644 --- a/spec/lib/gitlab/url_builder_spec.rb +++ b/spec/lib/gitlab/url_builder_spec.rb @@ -112,7 +112,7 @@ describe Gitlab::UrlBuilder, lib: true do wiki_page = build(:wiki_page) url = described_class.build(wiki_page) - expect(url).to eq "#{Gitlab.config.gitlab.url}#{wiki_page.wiki.wiki_base_path}/#{wiki_page.slug}" + expect(url).to eq "#{Gitlab.config.gitlab.url}/#{wiki_page.wiki.project.path_with_namespace}/wikis/#{wiki_page.slug}" end end end diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb index 532e3f013fd..ea659f417f2 100644 --- a/spec/models/project_wiki_spec.rb +++ b/spec/models/project_wiki_spec.rb @@ -38,7 +38,9 @@ describe ProjectWiki, models: true do describe "#wiki_base_path" do it "returns the wiki base path" do - wiki_base_path = "/#{project.path_with_namespace}/wikis" + gitlab_url = Gitlab.config.gitlab.url + wiki_base_path = "#{gitlab_url}/#{project.path_with_namespace}/wikis" + expect(subject.wiki_base_path).to eq(wiki_base_path) end end |