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:
Diffstat (limited to 'spec/lib/gitlab/etag_caching')
-rw-r--r--spec/lib/gitlab/etag_caching/middleware_spec.rb4
-rw-r--r--spec/lib/gitlab/etag_caching/router_spec.rb9
2 files changed, 11 insertions, 2 deletions
diff --git a/spec/lib/gitlab/etag_caching/middleware_spec.rb b/spec/lib/gitlab/etag_caching/middleware_spec.rb
index 9ead55075fa..e7734c6f9f6 100644
--- a/spec/lib/gitlab/etag_caching/middleware_spec.rb
+++ b/spec/lib/gitlab/etag_caching/middleware_spec.rb
@@ -7,10 +7,10 @@ describe Gitlab::EtagCaching::Middleware do
let(:middleware) { described_class.new(app) }
let(:app_status_code) { 200 }
let(:if_none_match) { nil }
- let(:enabled_path) { '/gitlab-org/gitlab-ce/noteable/issue/1/notes' }
+ let(:enabled_path) { '/gitlab-org/gitlab-foss/noteable/issue/1/notes' }
context 'when ETag caching is not enabled for current route' do
- let(:path) { '/gitlab-org/gitlab-ce/tree/master/noteable/issue/1/notes' }
+ let(:path) { '/gitlab-org/gitlab-foss/tree/master/noteable/issue/1/notes' }
before do
mock_app_response
diff --git a/spec/lib/gitlab/etag_caching/router_spec.rb b/spec/lib/gitlab/etag_caching/router_spec.rb
index fbc49d894a6..8fcd4eb3c21 100644
--- a/spec/lib/gitlab/etag_caching/router_spec.rb
+++ b/spec/lib/gitlab/etag_caching/router_spec.rb
@@ -92,6 +92,15 @@ describe Gitlab::EtagCaching::Router do
expect(result).to be_blank
end
+ it 'matches the cluster environments path' do
+ result = described_class.match(
+ '/my-group/my-project/-/clusters/47/environments'
+ )
+
+ expect(result).to be_present
+ expect(result.name).to eq 'cluster_environments'
+ end
+
it 'matches the environments path' do
result = described_class.match(
'/my-group/my-project/environments.json'