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
path: root/spec/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-06 00:25:58 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-06 00:25:58 +0300
commitfcc771ba8173d2102c9213494667f5b974a644c2 (patch)
treed2f70858981d2061e2643ab9bf33798c72e74f82 /spec/lib
parentd642cb18b44ada2e9ae8e165fcd7196aa5586676 (diff)
parentda0c9b005648cb683801ea8765f5f5f9fdb92c0c (diff)
Merge branch 'sh-fix-realtime-changes-with-reserved-words' into 'master'
Fix real-time updates for projects that contain a reserved word Closes #60113 See merge request gitlab-org/gitlab-ce!27060
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/etag_caching/router_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/gitlab/etag_caching/router_spec.rb b/spec/lib/gitlab/etag_caching/router_spec.rb
index f69cb502ca6..a7cb0bb2a87 100644
--- a/spec/lib/gitlab/etag_caching/router_spec.rb
+++ b/spec/lib/gitlab/etag_caching/router_spec.rb
@@ -19,6 +19,24 @@ describe Gitlab::EtagCaching::Router do
expect(result.name).to eq 'issue_title'
end
+ it 'matches with a project name that includes a suffix of create' do
+ result = described_class.match(
+ '/group/test-create/issues/123/realtime_changes'
+ )
+
+ expect(result).to be_present
+ expect(result.name).to eq 'issue_title'
+ end
+
+ it 'matches with a project name that includes a prefix of create' do
+ result = described_class.match(
+ '/group/create-test/issues/123/realtime_changes'
+ )
+
+ expect(result).to be_present
+ expect(result.name).to eq 'issue_title'
+ end
+
it 'matches project pipelines endpoint' do
result = described_class.match(
'/my-group/my-project/pipelines.json'