diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-26 01:22:54 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-26 01:22:54 +0100 |
commit | 688e802814f791a8723874dc88437bd8d140e103 (patch) | |
tree | aeaf5e435e5802d9c8ae855a88128a49bc9768c8 /clients/common/common_test.go | |
parent | 9a44cd8ccff143a112436c38bfe5581e74b68f07 (diff) | |
download | go-git-688e802814f791a8723874dc88437bd8d140e103.tar.gz |
objects: using readers from internal.Object
Diffstat (limited to 'clients/common/common_test.go')
-rw-r--r-- | clients/common/common_test.go | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/clients/common/common_test.go b/clients/common/common_test.go index 74492f0..43faf5b 100644 --- a/clients/common/common_test.go +++ b/clients/common/common_test.go @@ -7,6 +7,7 @@ import ( . "gopkg.in/check.v1" "gopkg.in/src-d/go-git.v2/formats/pktline" + "gopkg.in/src-d/go-git.v2/internal" ) func Test(t *testing.T) { TestingT(t) } @@ -48,15 +49,25 @@ func (s *SuiteCommon) TestGitUploadPackInfo(c *C) { ref := info.Capabilities.SymbolicReference("HEAD") c.Assert(ref, Equals, "refs/heads/master") - c.Assert(info.Refs[ref].Id, Equals, "6ecf0ef2c2dffb796033e5a02219af86ec6584e5") + c.Assert(info.Refs[ref].Id.String(), Equals, "6ecf0ef2c2dffb796033e5a02219af86ec6584e5") c.Assert(info.Refs[ref].Name, Equals, "refs/heads/master") } func (s *SuiteCommon) TestGitUploadPackRequest(c *C) { r := &GitUploadPackRequest{ - Want: []string{"foo", "qux"}, - Have: []string{"bar"}, + Want: []internal.Hash{ + internal.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c"), + internal.NewHash("2b41ef280fdb67a9b250678686a0c3e03b0a9989"), + }, + Have: []internal.Hash{ + internal.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5"), + }, } - c.Assert(r.String(), Equals, "000dwant foo\n000dwant qux\n000dhave bar\n00000009done\n") + c.Assert(r.String(), Equals, + "0032want d82f291cde9987322c8a0c81a325e1ba6159684c\n"+ + "0032want 2b41ef280fdb67a9b250678686a0c3e03b0a9989\n"+ + "0032have 6ecf0ef2c2dffb796033e5a02219af86ec6584e5\n0000"+ + "0009done\n", + ) } |