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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
247bd122
Commit
247bd122
authored
Feb 04, 2019
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed external wiki query method to prevent attribute caching
parent
6b0b14f8
Changes
3
Hide 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 @
247bd122
...
@@ -328,7 +328,7 @@ module ProjectsHelper
...
@@ -328,7 +328,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 @
247bd122
---
title
:
Changed external wiki query method to prevent attribute caching
merge_request
:
24907
author
:
type
:
fixed
spec/helpers/projects_helper_spec.rb
View file @
247bd122
...
@@ -372,21 +372,16 @@ describe ProjectsHelper do
...
@@ -372,21 +372,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