diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2019-01-09 16:05:52 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-31 16:51:53 +0100 |
commit | 740f07b1ec16e225a29e4b910e64775dd3985e88 (patch) | |
tree | 16a76320a74fd3e7dfb4ea9b8ee228a90e0ce637 /spec/helpers/projects_helper_spec.rb | |
parent | f27cba0feef5d664c97082a0fe1b2e4b3d62f839 (diff) | |
download | gitlab-ce-740f07b1ec16e225a29e4b910e64775dd3985e88.tar.gz |
Fixed bug when external wiki is enabled
When the external wiki is enabled, the internal wiki link is replaced
by the external wiki url. But the internal wiki is still accessible.
In this change the external wiki will have its own tab in the sidebar
and only if the services are disabled the tab (and access rights)
will not be displayed.
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 88b5d87f087..c2dd666f9df 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -358,6 +358,26 @@ describe ProjectsHelper do is_expected.not_to include(:pipelines) end end + + context 'when project has external wiki' do + before do + allow(project).to receive(:has_external_wiki?).and_return(true) + end + + it 'includes external wiki tab' do + is_expected.to include(:external_wiki) + end + end + + context 'when project does not have external wiki' do + before do + allow(project).to receive(:has_external_wiki?).and_return(false) + end + + it 'does not include external wiki tab' do + is_expected.not_to include(:external_wiki) + end + end end describe '#show_projects' do |