aboutsummaryrefslogtreecommitdiffstats
path: root/common_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-22 17:55:49 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-07-22 17:55:49 +0200
commit39ecae56e6246f8118c14a2cb6ca18660b7fef99 (patch)
tree6311d0536687b5345aad08f2fd4aba371ef37fd2 /common_test.go
parent2d10f1023e609894174b21bdf8d3738010099335 (diff)
downloadgo-git-39ecae56e6246f8118c14a2cb6ca18660b7fef99.tar.gz
remote: push, update remote refs on push
Diffstat (limited to 'common_test.go')
-rw-r--r--common_test.go11
1 files changed, 11 insertions, 0 deletions
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)
+ }
+}