diff options
author | Will Starms <vilhelmen@gmail.com> | 2016-08-25 19:48:08 +0300 |
---|---|---|
committer | Will Starms <vilhelmen@gmail.com> | 2016-10-07 21:46:59 +0300 |
commit | 4f1de5faacb6824bad2624b75537e9f4ddbb1207 (patch) | |
tree | b60a2b249f3039dc37854725a0c96a2ecbe0f8ab /spec/models/namespace_spec.rb | |
parent | c901936a829885263a602431e5762b0352073a2a (diff) |
Correct namespace validation to forbid bad names #21077
Adds .git and .atom to the master namespace regex
Updates existing group tests and adds two new ones
Updates path cleaning to also forbid .atom
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 544920d1824..431b3e4435f 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -114,6 +114,7 @@ describe Namespace, models: true do it "cleans the path and makes sure it's available" do expect(Namespace.clean_path("-john+gitlab-ETC%.git@gmail.com")).to eq("johngitlab-ETC2") + expect(Namespace.clean_path("--%+--valid_*&%name=.git.%.atom.atom.@email.com")).to eq("valid_name") end end end |