diff options
author | Paul T <paul.t@gembaadvantage.com> | 2021-11-02 07:51:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 07:51:10 +0000 |
commit | 411809ddb56551c2420c722acf49ce4e774333ad (patch) | |
tree | 353255c0c4719f39a0e1ff1b9262b98f4aedc91b /common_test.go | |
parent | 51514482c696e7d3aadd551cd1308cedc7055ce0 (diff) | |
parent | 3211a7a12a0ec2922d257fb14f09c6ecfb0b7c77 (diff) | |
download | go-git-411809ddb56551c2420c722acf49ce4e774333ad.tar.gz |
Merge branch 'go-git:master' into codecommit-ref-delta
Diffstat (limited to 'common_test.go')
-rw-r--r-- | common_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common_test.go b/common_test.go index 5f5bc4c..b47f5bb 100644 --- a/common_test.go +++ b/common_test.go @@ -198,3 +198,11 @@ func AssertReferences(c *C, r *Repository, expected map[string]string) { c.Assert(obtained, DeepEquals, expected) } } + +func AssertReferencesMissing(c *C, r *Repository, expected []string) { + for _, name := range expected { + _, err := r.Reference(plumbing.ReferenceName(name), false) + c.Assert(err, NotNil) + c.Assert(err, Equals, plumbing.ErrReferenceNotFound) + } +} |