Commit 8a7aad77 authored by Yorick Peterse's avatar Yorick Peterse

Added specs for Repository#exists?

parent 54aa0969
......@@ -229,6 +229,19 @@ describe Repository, models: true do
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
subject { repository.has_visible_content? }
......
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