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:
authorBob Van Landuyt <bob@gitlab.com>2019-08-13 18:41:25 +0300
committerBob Van Landuyt <bob@gitlab.com>2019-08-13 18:41:25 +0300
commit3702ab7317533896c7455357dd6643181666f22b (patch)
treecd1a6ff66d7ac489922da4a6a38df6057f5cf172 /spec/models
parent530f7f6f0f3172d5712beb0a00c861ffa6935bd7 (diff)
parentafe867921cab046a34bc463840c6e9f5d51f1f70 (diff)
Merge branch '65803-invalidate-branches-cache-on-refresh' into 'master'
Only expire branch cache once per push See merge request gitlab-org/gitlab-ce!31653
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/repository_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 12dff440ce2..fa243876632 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -1781,6 +1781,12 @@ describe Repository do
repository.after_create_branch
end
+
+ it 'does not expire the branch caches when specified' do
+ expect(repository).not_to receive(:expire_branches_cache)
+
+ repository.after_create_branch(expire_cache: false)
+ end
end
describe '#after_remove_branch' do
@@ -1789,6 +1795,12 @@ describe Repository do
repository.after_remove_branch
end
+
+ it 'does not expire the branch caches when specified' do
+ expect(repository).not_to receive(:expire_branches_cache)
+
+ repository.after_remove_branch(expire_cache: false)
+ end
end
describe '#after_create' do