Add specs on #license

This commit is contained in:
Zeger-Jan van de Weg
2015-10-15 21:50:15 +02:00
committed by Zeger-Jan van de Weg
parent 7248566632
commit 3f08e4b186
3 changed files with 17 additions and 2 deletions
+11
View File
@@ -91,4 +91,15 @@ describe Repository do
it { expect(subject.data.lines[2]).to eq(" - Feature: Replace teams with group membership\n") }
end
end
describe "#license" do
it 'test selection preference' do
repository.send(:cache).expire(:license)
TestBlob = Struct.new(:name)
files = [TestBlob.new('file'), TestBlob.new('license'), TestBlob.new('copying')]
expect(repository.tree).to receive(:blobs).and_return(files)
expect(repository.license.name).to eq('license')
end
end
end