summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-12-21 16:49:32 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-01-03 16:13:32 -0200
commit58c2f3b5796cd8349dbd90404ed6ad0ca3ee6caf (patch)
tree86459098eccf86e5da84130522b00a9c3e506f9a /spec/lib
parent2af3400c4eeb0227ca6f38117323a18e9fbd7d9b (diff)
downloadgitlab-ce-58c2f3b5796cd8349dbd90404ed6ad0ca3ee6caf.tar.gz
Fix Repository#processable? to allow .git repos in the root folder
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/bare_repository_import/repository_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/lib/gitlab/bare_repository_import/repository_spec.rb b/spec/lib/gitlab/bare_repository_import/repository_spec.rb
index 770e26bbf6a..e0b7d16ebb7 100644
--- a/spec/lib/gitlab/bare_repository_import/repository_spec.rb
+++ b/spec/lib/gitlab/bare_repository_import/repository_spec.rb
@@ -27,7 +27,13 @@ describe ::Gitlab::BareRepositoryImport::Repository do
expect(subject.processable?).to eq(false)
end
- it 'returns true when group and project name are present' do
+ it 'returns true if group path is missing' do
+ subject = described_class.new('/full/path/', '/full/path/repo.git')
+
+ expect(subject.processable?).to eq(true)
+ end
+
+ it 'returns true when group path and project name are present' do
expect(subject.processable?).to eq(true)
end
end
@@ -97,7 +103,7 @@ describe ::Gitlab::BareRepositoryImport::Repository do
expect(subject.processable?).to eq(false)
end
- it 'returns true when group and project name are present' do
+ it 'returns true when group path and project name are present' do
expect(subject.processable?).to eq(true)
end
end