summaryrefslogtreecommitdiff
path: root/spec/validators
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-04-14 20:06:20 +0200
committerBob Van Landuyt <bob@gitlab.com>2017-05-01 11:14:24 +0200
commitc5059cb4f705191074d3371beb81a3f0a67473af (patch)
treefbed521c239d49c7e8a26d6b3462eeff5a3c4808 /spec/validators
parent27f54bebb29a1e56251ac2d669c2883aeaf1cb1c (diff)
downloadgitlab-ce-c5059cb4f705191074d3371beb81a3f0a67473af.tar.gz
Make path validation case-insensitive
Diffstat (limited to 'spec/validators')
-rw-r--r--spec/validators/dynamic_path_validator_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/validators/dynamic_path_validator_spec.rb b/spec/validators/dynamic_path_validator_spec.rb
index 6c490b1be2e..b931a4a2dc3 100644
--- a/spec/validators/dynamic_path_validator_spec.rb
+++ b/spec/validators/dynamic_path_validator_spec.rb
@@ -81,7 +81,13 @@ describe DynamicPathValidator do
end
end
- describe '#valid_full_path' do
+ describe ".valid?" do
+ it 'is not case sensitive' do
+ expect(described_class.valid?("Users", type: :top_level)).to be(false)
+ end
+ end
+
+ describe '.valid_full_path' do
it "isn't valid when the top level is reserved" do
test_path = 'u/should-be-a/reserved-word'