diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 17:02:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-18 17:02:45 +0300 |
commit | 80f61b4035607d7cd87de993b8f5e996bde3481f (patch) | |
tree | 06b12f51e97d87192e3dd0e05edf55143645b894 /spec/lib/gitlab/etag_caching | |
parent | 4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/etag_caching')
-rw-r--r-- | spec/lib/gitlab/etag_caching/middleware_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/etag_caching/router_spec.rb | 9 |
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' |