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
a3eabcc2
Commit
a3eabcc2
authored
May 18, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tc-fix-broken-plain-readme' into 'master'
Fix ProjectCacheWorker for plain READMEs Closes #32540 See merge request !11506
parents
dd35bd2d
abc82a25
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 @
a3eabcc2
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 @
a3eabcc2
...
...
@@ -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