diff options
author | Toon Claes <toon@gitlab.com> | 2017-04-06 16:47:52 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-04-27 13:22:17 +0200 |
commit | 05e0f504530a162d4bcb886adf504c12cffd5934 (patch) | |
tree | aeece92fb84421062c919e0c63173718db3577ba /spec/models/repository_spec.rb | |
parent | ef4d4446e957ecbb086859d96185a27af168d11c (diff) | |
download | gitlab-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/repository_spec.rb')
-rw-r--r-- | spec/models/repository_spec.rb | 4 |
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) |