diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-18 23:25:31 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-18 23:25:31 +0300 |
commit | a3eabcc20c422db7032e31397c21dbc6ca3166de (patch) | |
tree | 614fb7cba8fa6b9151b5091505b3902af96d1a65 /spec | |
parent | dd35bd2d3535283ab70c6f80c27f0a0fa2a78ccf (diff) | |
parent | abc82a2508d102bb30789bce4a8b4ba56011683a (diff) |
Merge branch 'tc-fix-broken-plain-readme' into 'master'
Fix ProjectCacheWorker for plain READMEs
Closes #32540
See merge request !11506
Diffstat (limited to 'spec')
-rw-r--r-- | spec/workers/project_cache_worker_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/workers/project_cache_worker_spec.rb b/spec/workers/project_cache_worker_spec.rb index c23ffdf99c0..a4ba5f7c943 100644 --- a/spec/workers/project_cache_worker_spec.rb +++ b/spec/workers/project_cache_worker_spec.rb @@ -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 |