diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-01-31 11:39:03 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-02-06 12:09:03 -0600 |
commit | a03d29da1dbbef3c202899cef3cd89b453a8b76f (patch) | |
tree | 83f08b67027f9169eac9dfbc6a4c19f1752ad9ff /spec/lib | |
parent | 75144b1e03db342730535f1f49b0e7cd2987d755 (diff) | |
download | gitlab-ce-a03d29da1dbbef3c202899cef3cd89b453a8b76f.tar.gz |
Validate User username only on Namespace, and bubble up appropriately
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/path_regex_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/path_regex_spec.rb b/spec/lib/gitlab/path_regex_spec.rb index 85991c38363..a40330d853f 100644 --- a/spec/lib/gitlab/path_regex_spec.rb +++ b/spec/lib/gitlab/path_regex_spec.rb @@ -194,8 +194,8 @@ describe Gitlab::PathRegex do end end - describe '.root_namespace_path_regex' do - subject { described_class.root_namespace_path_regex } + describe '.root_namespace_route_regex' do + subject { %r{\A#{described_class.root_namespace_route_regex}/\z} } it 'rejects top level routes' do expect(subject).not_to match('admin/') @@ -318,8 +318,8 @@ describe Gitlab::PathRegex do end end - describe '.project_path_regex' do - subject { described_class.project_path_regex } + describe '.project_route_regex' do + subject { %r{\A#{described_class.project_route_regex}/\z} } it 'accepts top level routes' do expect(subject).to match('admin/') |