diff options
Diffstat (limited to 'plumbing/transport/test')
-rw-r--r-- | plumbing/transport/test/common.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plumbing/transport/test/common.go b/plumbing/transport/test/common.go index 7818fbb..ed2e141 100644 --- a/plumbing/transport/test/common.go +++ b/plumbing/transport/test/common.go @@ -15,6 +15,7 @@ import ( "gopkg.in/src-d/go-git.v4/storage/memory" . "gopkg.in/check.v1" + "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/capability" ) type FetchPackSuite struct { @@ -64,7 +65,9 @@ func (s *FetchPackSuite) TestDefaultBranch(c *C) { info, err := r.AdvertisedReferences() c.Assert(err, IsNil) - c.Assert(info.Capabilities.SymbolicReference("HEAD"), Equals, "refs/heads/master") + symrefs := info.Capabilities.Get(capability.SymRef) + c.Assert(symrefs, HasLen, 1) + c.Assert(symrefs[0], Equals, "HEAD:refs/heads/master") } func (s *FetchPackSuite) TestCapabilities(c *C) { @@ -74,7 +77,7 @@ func (s *FetchPackSuite) TestCapabilities(c *C) { info, err := r.AdvertisedReferences() c.Assert(err, IsNil) - c.Assert(info.Capabilities.Get("agent").Values, HasLen, 1) + c.Assert(info.Capabilities.Get(capability.Agent), HasLen, 1) } func (s *FetchPackSuite) TestFullFetchPack(c *C) { |