summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-04-06 16:47:52 +0200
committerToon Claes <toon@gitlab.com>2017-04-27 13:22:17 +0200
commit05e0f504530a162d4bcb886adf504c12cffd5934 (patch)
treeaeece92fb84421062c919e0c63173718db3577ba /spec/models
parentef4d4446e957ecbb086859d96185a27af168d11c (diff)
downloadgitlab-ce-05e0f504530a162d4bcb886adf504c12cffd5934.tar.gz
Cache the rendered README, but post-process on show
Because the post-processing of the rendered README is dependent on the context (i.e. the current user), do the post-processing when the README is being displayed.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/repository_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 74d5ebc6db0..98d0641443e 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -1803,9 +1803,9 @@ describe Repository, models: true do
describe '#refresh_method_caches' do
it 'refreshes the caches of the given types' do
expect(repository).to receive(:expire_method_caches).
- with(%i(readme license_blob license_key))
+ with(%i(rendered_readme license_blob license_key))
- expect(repository).to receive(:readme)
+ expect(repository).to receive(:rendered_readme)
expect(repository).to receive(:license_blob)
expect(repository).to receive(:license_key)