BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d3cc3516
Commit
d3cc3516
authored
May 18, 2017
by
Douwe Maan
Committed by
Timothy Andrew
May 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'tc-fix-broken-plain-readme' into 'master'
Fix ProjectCacheWorker for plain READMEs Closes #32540 See merge request !11506
parent
538fb03a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
markup_helper.rb
app/helpers/markup_helper.rb
+3
-0
project_cache_worker_spec.rb
spec/workers/project_cache_worker_spec.rb
+12
-0
No files found.
app/helpers/markup_helper.rb
View file @
d3cc3516
require
'nokogiri'
module
MarkupHelper
include
ActionView
::
Helpers
::
TagHelper
include
ActionView
::
Context
def
plain?
(
filename
)
Gitlab
::
MarkupHelper
.
plain?
(
filename
)
end
...
...
spec/workers/project_cache_worker_spec.rb
View file @
d3cc3516
...
...
@@ -45,6 +45,18 @@ describe ProjectCacheWorker do
worker
.
perform
(
project
.
id
,
%w(readme)
)
end
context
'with plain readme'
do
it
'refreshes the method caches'
do
allow
(
MarkupHelper
).
to
receive
(
:gitlab_markdown?
).
and_return
(
false
)
allow
(
MarkupHelper
).
to
receive
(
:plain?
).
and_return
(
true
)
expect_any_instance_of
(
Repository
).
to
receive
(
:refresh_method_caches
).
with
(
%i(readme)
).
and_call_original
worker
.
perform
(
project
.
id
,
%w(readme)
)
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