Commit 81add16e authored by Sean McGivern's avatar Sean McGivern

Merge branch 'zj-unit-test-gitaly-arrays' into 'master'

Add unit tests for Gitaly types

See merge request gitlab-org/gitlab-ce!17237
parents 94811ee1 f42bf66e
...@@ -276,6 +276,7 @@ describe Gitlab::Git::Blob, seed_helper: true do ...@@ -276,6 +276,7 @@ describe Gitlab::Git::Blob, seed_helper: true do
expect(blobs.count).to eq(1) expect(blobs.count).to eq(1)
expect(blobs).to all( be_a(Gitlab::Git::Blob) ) expect(blobs).to all( be_a(Gitlab::Git::Blob) )
expect(blobs).to be_an(Array)
end end
it 'accepts blob IDs as a lazy enumerator' do it 'accepts blob IDs as a lazy enumerator' do
......
...@@ -102,6 +102,10 @@ describe Gitlab::Git::Commit, seed_helper: true do ...@@ -102,6 +102,10 @@ describe Gitlab::Git::Commit, seed_helper: true do
expect(described_class.find(repository, SeedRepo::Commit::ID)).to be_valid_commit expect(described_class.find(repository, SeedRepo::Commit::ID)).to be_valid_commit
end 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 it "should return valid commit for tag" do
expect(described_class.find(repository, 'v1.0.0').id).to eq('6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9') expect(described_class.find(repository, 'v1.0.0').id).to eq('6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9')
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