Add unit tests for Gitaly types

This commit is contained in:
Zeger-Jan van de Weg 2018-02-20 13:57:33 +01:00
parent 5048c8d505
commit f42bf66eef
No known key found for this signature in database
GPG Key ID: 65F6A8D64A88ABAC
2 changed files with 5 additions and 0 deletions

View File

@ -276,6 +276,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
expect(blobs.count).to eq(1)
expect(blobs).to all( be_a(Gitlab::Git::Blob) )
expect(blobs).to be_an(Array)
end
it 'accepts blob IDs as a lazy enumerator' do

View File

@ -102,6 +102,10 @@ describe Gitlab::Git::Commit, seed_helper: true do
expect(described_class.find(repository, SeedRepo::Commit::ID)).to be_valid_commit
end
it "returns an array of parent ids" do
expect(described_class.find(repository, SeedRepo::Commit::ID).parent_ids).to be_an(Array)
end
it "should return valid commit for tag" do
expect(described_class.find(repository, 'v1.0.0').id).to eq('6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9')
end