aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/test/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/transport/test/common.go')
-rw-r--r--plumbing/transport/test/common.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/plumbing/transport/test/common.go b/plumbing/transport/test/common.go
index 3b7f05f..2984154 100644
--- a/plumbing/transport/test/common.go
+++ b/plumbing/transport/test/common.go
@@ -49,13 +49,15 @@ func (s *FetchPackSuite) TestInfoNotExists(c *C) {
c.Assert(reader, IsNil)
}
-func (s *FetchPackSuite) TestCannotCallAdvertisedReferenceTwice(c *C) {
+func (s *FetchPackSuite) TestCallAdvertisedReferenceTwice(c *C) {
r, err := s.Client.NewFetchPackSession(s.Endpoint)
c.Assert(err, IsNil)
- _, err = r.AdvertisedReferences()
+ ar1, err := r.AdvertisedReferences()
c.Assert(err, IsNil)
- _, err = r.AdvertisedReferences()
- c.Assert(err, Equals, transport.ErrAdvertistedReferencesAlreadyCalled)
+ c.Assert(ar1, NotNil)
+ ar2, err := r.AdvertisedReferences()
+ c.Assert(err, IsNil)
+ c.Assert(ar2, DeepEquals, ar1)
}
func (s *FetchPackSuite) TestDefaultBranch(c *C) {