diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 21:06:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 21:06:28 +0000 |
commit | 8f210aebe1d740e8ee194f171f1f33a6e1fba313 (patch) | |
tree | f43c545801bb96fd0737f18493fb30ab92972627 /spec/models/project_wiki_spec.rb | |
parent | 996f700997805b3590da8d8afdd19d193989078a (diff) | |
download | gitlab-ce-8f210aebe1d740e8ee194f171f1f33a6e1fba313.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_wiki_spec.rb')
-rw-r--r-- | spec/models/project_wiki_spec.rb | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb index f5c827e5a29..31d1d1fd7d1 100644 --- a/spec/models/project_wiki_spec.rb +++ b/spec/models/project_wiki_spec.rb @@ -28,9 +28,7 @@ describe ProjectWiki do describe '#web_url' do it 'returns the full web URL to the wiki' do - home_url = Gitlab::Routing.url_helpers.project_wiki_url(project, :home) - - expect(subject.web_url).to eq(home_url) + expect(subject.web_url).to eq("#{Gitlab.config.gitlab.url}/#{project.full_path}/wikis/home") end end @@ -73,23 +71,9 @@ describe ProjectWiki do describe "#wiki_base_path" do it "returns the wiki base path" do - wiki_path = Gitlab::Routing.url_helpers.project_wikis_path(project) - - expect(subject.wiki_base_path).to eq(wiki_path) - end - end + wiki_base_path = "#{Gitlab.config.gitlab.relative_url_root}/#{project.full_path}/wikis" - describe "#wiki_page_path" do - let(:page) { create(:wiki_page, wiki: project_wiki) } - - describe 'suffixed with /:page_slug' do - subject { "#{project_wiki.wiki_page_path}/#{page.slug}" } - - it "equals the project_wiki_path" do - path = Gitlab::Routing.url_helpers.project_wiki_path(project, page) - - expect(subject).to eq(path) - end + expect(subject.wiki_base_path).to eq(wiki_base_path) end end |