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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-08 03:32:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-08 03:32:37 +0300
commit469a50879c1085ec77c95d650b7f135fee2c9e13 (patch)
tree0d639a63294b5abdb4e4a7bf1ed5a497d5e6869f /spec/models/environment_spec.rb
parentaa5ca44f172f02f04cca448b1f9c17d6d933de40 (diff)
Add latest changes from gitlab-org/gitlab@13-7-stable-ee
Diffstat (limited to 'spec/models/environment_spec.rb')
-rw-r--r--spec/models/environment_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb
index 3e10ea847ba..0c7d8e2969d 100644
--- a/spec/models/environment_spec.rb
+++ b/spec/models/environment_spec.rb
@@ -1547,4 +1547,18 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do
end
end
end
+
+ describe '#clear_all_caches' do
+ subject { environment.clear_all_caches }
+
+ it 'clears all caches on the environment' do
+ expect_next_instance_of(Gitlab::EtagCaching::Store) do |store|
+ expect(store).to receive(:touch).with(environment.etag_cache_key)
+ end
+
+ expect(environment).to receive(:clear_reactive_cache!)
+
+ subject
+ end
+ end
end