Added specs for Repository#exists?
This commit is contained in:
parent
54aa0969d4
commit
8a7aad770c
|
@ -229,6 +229,19 @@ describe Repository, models: true do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#exists?' do
|
||||||
|
it 'returns true when a repository exists' do
|
||||||
|
expect(repository.exists?).to eq(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'returns false when a repository does not exist' do
|
||||||
|
expect(repository.raw_repository).to receive(:rugged).
|
||||||
|
and_raise(Gitlab::Git::Repository::NoRepository)
|
||||||
|
|
||||||
|
expect(repository.exists?).to eq(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#has_visible_content?' do
|
describe '#has_visible_content?' do
|
||||||
subject { repository.has_visible_content? }
|
subject { repository.has_visible_content? }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue