summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/path_regex_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 14:34:42 +0000
commit9f46488805e86b1bc341ea1620b866016c2ce5ed (patch)
treef9748c7e287041e37d6da49e0a29c9511dc34768 /spec/lib/gitlab/path_regex_spec.rb
parentdfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff)
downloadgitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/lib/gitlab/path_regex_spec.rb')
-rw-r--r--spec/lib/gitlab/path_regex_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/path_regex_spec.rb b/spec/lib/gitlab/path_regex_spec.rb
index 8dabe5a756b..50b045c6aad 100644
--- a/spec/lib/gitlab/path_regex_spec.rb
+++ b/spec/lib/gitlab/path_regex_spec.rb
@@ -170,6 +170,11 @@ describe Gitlab::PathRegex do
expect(described_class::TOP_LEVEL_ROUTES)
.to contain_exactly(*top_level_words), failure_block
end
+
+ # We ban new items in this list, see https://gitlab.com/gitlab-org/gitlab/-/issues/215362
+ it 'does not allow expansion' do
+ expect(described_class::TOP_LEVEL_ROUTES.size).to eq(41)
+ end
end
describe 'GROUP_ROUTES' do
@@ -184,6 +189,11 @@ describe Gitlab::PathRegex do
expect(described_class::GROUP_ROUTES)
.to contain_exactly(*paths_after_group_id), failure_block
end
+
+ # We ban new items in this list, see https://gitlab.com/gitlab-org/gitlab/-/issues/215362
+ it 'does not allow expansion' do
+ expect(described_class::GROUP_ROUTES.size).to eq(1)
+ end
end
describe 'PROJECT_WILDCARD_ROUTES' do
@@ -195,6 +205,11 @@ describe Gitlab::PathRegex do
end
end
end
+
+ # We ban new items in this list, see https://gitlab.com/gitlab-org/gitlab/-/issues/215362
+ it 'does not allow expansion' do
+ expect(described_class::PROJECT_WILDCARD_ROUTES.size).to eq(21)
+ end
end
describe '.root_namespace_route_regex' do