Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@gitlab.com>2018-06-22 15:59:36 +0300
committerImre Farkas <ifarkas@gitlab.com>2018-06-29 18:41:57 +0300
commitd4d6528c863d48c9e2d30e6b5927ef01ec35e0e3 (patch)
tree68d1079afab2b1ebaabc855425889f253cd16c48 /spec/models/repository_spec.rb
parent9c3214640cfb572af3cc419d159c11bcd5b5e624 (diff)
Expire correct method caches after HEAD changed
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb28
1 files changed, 19 insertions, 9 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index d817a8376f4..4c4d61218e9 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -1699,19 +1699,29 @@ describe Repository do
end
describe '#after_change_head' do
- it 'flushes the readme cache' do
+ it 'flushes the method caches' do
expect(repository).to receive(:expire_method_caches).with([
- :readme,
+ :size,
+ :commit_count,
+ :rendered_readme,
+ :contribution_guide,
:changelog,
- :license,
- :contributing,
+ :license_blob,
+ :license_key,
:gitignore,
- :koding,
- :gitlab_ci,
+ :koding_yml,
+ :gitlab_ci_yml,
+ :branch_names,
+ :tag_names,
+ :branch_count,
+ :tag_count,
:avatar,
- :issue_template,
- :merge_request_template,
- :xcode_config
+ :exists?,
+ :root_ref,
+ :has_visible_content?,
+ :issue_template_names,
+ :merge_request_template_names,
+ :xcode_project?
])
repository.after_change_head