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
ae10e20f
Commit
ae10e20f
authored
Sep 11, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the test to the correct place
parent
fe89acc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
spec/lib/banzai/renderer_spec.rb
spec/lib/banzai/renderer_spec.rb
+7
-8
No files found.
spec/lib/banzai/renderer_spec.rb
View file @
ae10e20f
...
...
@@ -16,20 +16,12 @@ describe Banzai::Renderer do
context
'without cache'
do
let
(
:commit
)
{
create
(
:project
,
:repository
).
commit
}
let
(
:object
)
{
fake_object
(
fresh:
false
)
}
it
'returns cacheless render field'
do
expect
(
renderer
).
to
receive
(
:cacheless_render_field
).
with
(
commit
,
:title
)
renderer
.
render_field
(
commit
,
:title
)
end
it
"skips database caching on a Geo secondary"
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
).
and_return
(
true
)
expect
(
object
).
to
receive
(
:refresh_markdown_cache!
).
with
(
do_update:
false
)
expect
(
renderer
.
render_field
(
object
,
:field
)).
to
eq
(
'field_html'
)
end
end
context
'with cache'
do
...
...
@@ -43,6 +35,13 @@ describe Banzai::Renderer do
is_expected
.
to
eq
(
'field_html'
)
end
it
"skips database caching on a Geo secondary"
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
).
and_return
(
true
)
expect
(
object
).
to
receive
(
:refresh_markdown_cache!
).
with
(
do_update:
false
)
is_expected
.
to
eq
(
'field_html'
)
end
end
context
'with an up-to-date cache'
do
...
...
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