summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-04-07 00:23:02 -0700
committerStan Hu <stanhu@gmail.com>2016-04-07 00:29:01 -0700
commit27b9f64efbbce9d74eeb9c4ae340506242c474cb (patch)
treea83ef198b7127053c8920a39d12600e2a3200c73 /spec/models
parent8f0945311b8f5fe30b0b57739ee9f3262499f375 (diff)
downloadgitlab-ce-27b9f64efbbce9d74eeb9c4ae340506242c474cb.tar.gz
Expire caches after project creation to ensure a consistent state
Closes #14961
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/repository_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index f517f325c03..4e49c413f23 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -670,6 +670,19 @@ describe Repository, models: true do
repository.after_create
end
+
+ it 'flushes the root ref cache' do
+ expect(repository).to receive(:expire_root_ref_cache)
+
+ repository.after_create
+ end
+
+ it 'flushes the emptiness caches' do
+ expect(repository).to receive(:expire_emptiness_caches)
+
+ repository.after_create
+ end
+
end
describe "#main_language" do