Refactoring Gitlab::BareRepositoryImport::Repository

parent 3f5403ab
...@@ -24,17 +24,17 @@ describe ::Gitlab::BareRepositoryImport::Repository do ...@@ -24,17 +24,17 @@ describe ::Gitlab::BareRepositoryImport::Repository do
it 'returns false if it is a wiki' do it 'returns false if it is a wiki' do
subject = described_class.new('/full/path/', '/full/path/to/a/b/my.wiki.git') subject = described_class.new('/full/path/', '/full/path/to/a/b/my.wiki.git')
expect(subject.processable?).to eq(false) expect(subject).not_to be_processable
end end
it 'returns true if group path is missing' do it 'returns true if group path is missing' do
subject = described_class.new('/full/path/', '/full/path/repo.git') subject = described_class.new('/full/path/', '/full/path/repo.git')
expect(subject.processable?).to eq(true) expect(subject).to be_processable
end end
it 'returns true when group path and project name are present' do it 'returns true when group path and project name are present' do
expect(subject.processable?).to eq(true) expect(subject).to be_processable
end end
end end
...@@ -92,18 +92,18 @@ describe ::Gitlab::BareRepositoryImport::Repository do ...@@ -92,18 +92,18 @@ describe ::Gitlab::BareRepositoryImport::Repository do
it 'returns false if it is a wiki' do it 'returns false if it is a wiki' do
subject = described_class.new(root_path, wiki_path) subject = described_class.new(root_path, wiki_path)
expect(subject.processable?).to eq(false) expect(subject).not_to be_processable
end end
it 'returns false when group and project name are missing' do it 'returns false when group and project name are missing' do
repository = Rugged::Repository.new(repo_path) repository = Rugged::Repository.new(repo_path)
repository.config.delete('gitlab.fullpath') repository.config.delete('gitlab.fullpath')
expect(subject.processable?).to eq(false) expect(subject).not_to be_processable
end end
it 'returns true when group path and project name are present' do it 'returns true when group path and project name are present' do
expect(subject.processable?).to eq(true) expect(subject).to be_processable
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment