From 39ecae56e6246f8118c14a2cb6ca18660b7fef99 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Sat, 22 Jul 2017 17:55:49 +0200 Subject: remote: push, update remote refs on push --- common_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'common_test.go') diff --git a/common_test.go b/common_test.go index 21b4481..a7cd755 100644 --- a/common_test.go +++ b/common_test.go @@ -169,3 +169,14 @@ func (s *SuiteCommon) TestCountLines(c *C) { c.Assert(o, Equals, t.e, Commentf("subtest %d, input=%q", i, t.i)) } } + +func AssertReferences(c *C, r *Repository, expected map[string]string) { + for name, target := range expected { + expected := plumbing.NewReferenceFromStrings(name, target) + + obtained, err := r.Reference(expected.Name(), true) + c.Assert(err, IsNil) + + c.Assert(obtained, DeepEquals, expected) + } +} -- cgit