Commit 4b3f3167 authored by tiagonbotelho's avatar tiagonbotelho Committed by Yorick Peterse

implements test to simulate empty repo

parent d72e6ad2
......@@ -600,5 +600,11 @@ describe Repository, models: true do
it 'shows the main language of the project' do
expect(repository.main_language).to eq("Ruby")
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
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