Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
903a446e
Commit
903a446e
authored
Apr 23, 2020
by
Dmytro Zaporozhets
Committed by
Bob Van Landuyt
Apr 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec on routes regex constants
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
e0b8d5ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spec/lib/gitlab/path_regex_spec.rb
spec/lib/gitlab/path_regex_spec.rb
+15
-0
No files found.
spec/lib/gitlab/path_regex_spec.rb
View file @
903a446e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment