diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-05 21:25:58 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-05 21:25:58 +0000 |
commit | fcc771ba8173d2102c9213494667f5b974a644c2 (patch) | |
tree | d2f70858981d2061e2643ab9bf33798c72e74f82 /spec/lib | |
parent | d642cb18b44ada2e9ae8e165fcd7196aa5586676 (diff) | |
parent | da0c9b005648cb683801ea8765f5f5f9fdb92c0c (diff) | |
download | gitlab-ce-fcc771ba8173d2102c9213494667f5b974a644c2.tar.gz |
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.rb | 18 |
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' |