Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-03 10:06:59 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-03 10:06:59 +0300
commitf438791721360e547f3661a553f491d258013eb8 (patch)
tree6e98d853aec9bca5fec4ebdfcbd0f875308f102b /spec/models/namespace_spec.rb
parent2f4656b5c7e2a9b351237432e76a7b928a1684b1 (diff)
Fix import check for case sensetive namespaces
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r--spec/models/namespace_spec.rb10
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