summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-02-20 16:23:08 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-02-20 16:23:08 +0000
commit81add16e67aabaf907365c8061019b371d20ec3b (patch)
tree9c01284037c0010f692934d37e25f2e9160b46d1
parent94811ee1b62a478f2beb89be00ea93fa42f015dc (diff)
parentf42bf66eef7f690d629dc4535129a4fe69da813e (diff)
downloadgitlab-ce-81add16e67aabaf907365c8061019b371d20ec3b.tar.gz
Merge branch 'zj-unit-test-gitaly-arrays' into 'master'
Add unit tests for Gitaly types See merge request gitlab-org/gitlab-ce!17237
-rw-r--r--spec/lib/gitlab/git/blob_spec.rb1
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb4
2 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb
index 59e9e1cc94c..a6341cd509b 100644
--- a/spec/lib/gitlab/git/blob_spec.rb
+++ b/spec/lib/gitlab/git/blob_spec.rb
@@ -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
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 85e6efd7ca2..0b20a6349a2 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -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