Commit 71e6a91a authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 681d537f 7ffbfeb1
......@@ -330,7 +330,7 @@ module ProjectsHelper
def external_nav_tabs(project)
[].tap do |tabs|
tabs << :external_issue_tracker if project.external_issue_tracker
tabs << :external_wiki if project.has_external_wiki?
tabs << :external_wiki if project.external_wiki
end
end
......
---
title: Changed external wiki query method to prevent attribute caching
merge_request: 24907
author:
type: fixed
......@@ -381,21 +381,16 @@ describe ProjectsHelper do
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
project.create_external_wiki_service(active: true, properties: { 'external_wiki_url' => 'https://gitlab.com' })
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
expect(project.external_wiki).to be_nil
is_expected.not_to include(:external_wiki)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment