diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-02 23:06:59 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-02 23:06:59 -0800 |
commit | f438791721360e547f3661a553f491d258013eb8 (patch) | |
tree | 6e98d853aec9bca5fec4ebdfcbd0f875308f102b /spec/models | |
parent | 2f4656b5c7e2a9b351237432e76a7b928a1684b1 (diff) | |
download | gitlab-ce-f438791721360e547f3661a553f491d258013eb8.tar.gz |
Fix import check for case sensetive namespaces
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/namespace_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 4e268f8d8fa..ed6845c82cc 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -75,4 +75,14 @@ describe Namespace do expect(namespace.rm_dir).to be_truthy end end + + describe :find_by_path_or_name do + before do + @namespace = create(:namespace, name: 'WoW', path: 'woW') + end + + it { expect(Namespace.find_by_path_or_name('wow')).to eq(@namespace) } + it { expect(Namespace.find_by_path_or_name('WOW')).to eq(@namespace) } + it { expect(Namespace.find_by_path_or_name('unknown')).to eq(nil) } + end end |