implements test to simulate empty repo
This commit is contained in:
parent
d72e6ad2a1
commit
4b3f3167a4
|
@ -600,5 +600,11 @@ describe Repository, models: true do
|
||||||
it 'shows the main language of the project' do
|
it 'shows the main language of the project' do
|
||||||
expect(repository.main_language).to eq("Ruby")
|
expect(repository.main_language).to eq("Ruby")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'returns nil when the repository is empty' do
|
||||||
|
allow(repository).to receive(:empty?).and_return(true)
|
||||||
|
|
||||||
|
expect(repository.main_language).to be_nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue