diff options
Diffstat (limited to 'remote_test.go')
-rw-r--r-- | remote_test.go | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/remote_test.go b/remote_test.go index 10f6708..def5c8d 100644 --- a/remote_test.go +++ b/remote_test.go @@ -625,20 +625,22 @@ func (s *RemoteSuite) TestPushWrongRemoteName(c *C) { } func (s *RemoteSuite) TestGetHaves(c *C) { - st := memory.NewStorage() - st.SetReference(plumbing.NewReferenceFromStrings( - "foo", "f7b877701fbf855b44c0a9e86f3fdce2c298b07f", - )) - - st.SetReference(plumbing.NewReferenceFromStrings( - "bar", "fe6cb94756faa81e5ed9240f9191b833db5f40ae", - )) - - st.SetReference(plumbing.NewReferenceFromStrings( - "qux", "f7b877701fbf855b44c0a9e86f3fdce2c298b07f", - )) + var localRefs = []*plumbing.Reference{ + plumbing.NewReferenceFromStrings( + "foo", + "f7b877701fbf855b44c0a9e86f3fdce2c298b07f", + ), + plumbing.NewReferenceFromStrings( + "bar", + "fe6cb94756faa81e5ed9240f9191b833db5f40ae", + ), + plumbing.NewReferenceFromStrings( + "qux", + "f7b877701fbf855b44c0a9e86f3fdce2c298b07f", + ), + } - l, err := getHaves(st) + l, err := getHaves(localRefs) c.Assert(err, IsNil) c.Assert(l, HasLen, 2) } |