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>2023-02-20 16:49:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 16:49:51 +0300
commit71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch)
tree6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /spec/lib/gitlab/pages
parenta7253423e3403b8c08f8a161e5937e1488f5f407 (diff)
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'spec/lib/gitlab/pages')
-rw-r--r--spec/lib/gitlab/pages/cache_control_spec.rb26
1 files changed, 17 insertions, 9 deletions
diff --git a/spec/lib/gitlab/pages/cache_control_spec.rb b/spec/lib/gitlab/pages/cache_control_spec.rb
index dd15aa87441..72240f52580 100644
--- a/spec/lib/gitlab/pages/cache_control_spec.rb
+++ b/spec/lib/gitlab/pages/cache_control_spec.rb
@@ -13,15 +13,23 @@ RSpec.describe Gitlab::Pages::CacheControl, feature_category: :pages do
end
it 'clears the cache' do
+ cached_keys = [
+ "pages_domain_for_#{type}_1_settings-hash",
+ "pages_domain_for_#{type}_1"
+ ]
+
+ expect(::Gitlab::AppLogger)
+ .to receive(:info)
+ .with(
+ message: 'clear pages cache',
+ pages_keys: cached_keys,
+ pages_type: type,
+ pages_id: 1
+ )
+
expect(Rails.cache)
.to receive(:delete_multi)
- .with(
- array_including(
- [
- "pages_domain_for_#{type}_1",
- "pages_domain_for_#{type}_1_settings-hash"
- ]
- ))
+ .with(cached_keys)
subject.clear_cache
end
@@ -31,13 +39,13 @@ RSpec.describe Gitlab::Pages::CacheControl, feature_category: :pages do
describe '.for_namespace' do
subject(:cache_control) { described_class.for_namespace(1) }
- it_behaves_like 'cache_control', 'namespace'
+ it_behaves_like 'cache_control', :namespace
end
describe '.for_domain' do
subject(:cache_control) { described_class.for_domain(1) }
- it_behaves_like 'cache_control', 'domain'
+ it_behaves_like 'cache_control', :domain
end
describe '#cache_key' do