Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
71e6a91a
Commit
71e6a91a
authored
Feb 04, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
681d537f
7ffbfeb1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
changelogs/unreleased/fj-regression-external-wiki-url.yml
changelogs/unreleased/fj-regression-external-wiki-url.yml
+5
-0
spec/helpers/projects_helper_spec.rb
spec/helpers/projects_helper_spec.rb
+3
-8
No files found.
app/helpers/projects_helper.rb
View file @
71e6a91a
...
@@ -330,7 +330,7 @@ module ProjectsHelper
...
@@ -330,7 +330,7 @@ module ProjectsHelper
def
external_nav_tabs
(
project
)
def
external_nav_tabs
(
project
)
[].
tap
do
|
tabs
|
[].
tap
do
|
tabs
|
tabs
<<
:external_issue_tracker
if
project
.
external_issue_tracker
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
end
end
...
...
changelogs/unreleased/fj-regression-external-wiki-url.yml
0 → 100644
View file @
71e6a91a
---
title
:
Changed external wiki query method to prevent attribute caching
merge_request
:
24907
author
:
type
:
fixed
spec/helpers/projects_helper_spec.rb
View file @
71e6a91a
...
@@ -381,21 +381,16 @@ describe ProjectsHelper do
...
@@ -381,21 +381,16 @@ describe ProjectsHelper do
end
end
context
'when project has external wiki'
do
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
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
)
is_expected
.
to
include
(
:external_wiki
)
end
end
end
end
context
'when project does not have external wiki'
do
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
it
'does not include external wiki tab'
do
expect
(
project
.
external_wiki
).
to
be_nil
is_expected
.
not_to
include
(
:external_wiki
)
is_expected
.
not_to
include
(
:external_wiki
)
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment