diff options
author | Colton McCurdy <mccurdyc22@gmail.com> | 2018-11-01 08:01:34 -0400 |
---|---|---|
committer | Colton McCurdy <mccurdyc22@gmail.com> | 2018-11-01 08:01:34 -0400 |
commit | 3fe6f65a9955d25d51d195d5d4ce43339c813534 (patch) | |
tree | 5b1f0168b856665a1fb2a9eabab3af4bb056e28f /plumbing/reference_test.go | |
parent | 43d4551b4b6e49af1a1402047b3a81fbcd6a85e9 (diff) | |
parent | 959dc01faa3352c0b41ff0fa257239f5f00165db (diff) | |
download | go-git-3fe6f65a9955d25d51d195d5d4ce43339c813534.tar.gz |
Merge branch 'master' of github.com:src-d/go-git into mccurdyc/Issue#969/fix-flaky-ssh-test
Diffstat (limited to 'plumbing/reference_test.go')
-rw-r--r-- | plumbing/reference_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plumbing/reference_test.go b/plumbing/reference_test.go index 47919ef..b3ccf53 100644 --- a/plumbing/reference_test.go +++ b/plumbing/reference_test.go @@ -54,6 +54,31 @@ func (s *ReferenceSuite) TestNewHashReference(c *C) { c.Assert(r.Hash(), Equals, NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5")) } +func (s *ReferenceSuite) TestNewBranchReferenceName(c *C) { + r := NewBranchReferenceName("foo") + c.Assert(r.String(), Equals, "refs/heads/foo") +} + +func (s *ReferenceSuite) TestNewNoteReferenceName(c *C) { + r := NewNoteReferenceName("foo") + c.Assert(r.String(), Equals, "refs/notes/foo") +} + +func (s *ReferenceSuite) TestNewRemoteReferenceName(c *C) { + r := NewRemoteReferenceName("bar", "foo") + c.Assert(r.String(), Equals, "refs/remotes/bar/foo") +} + +func (s *ReferenceSuite) TestNewRemoteHEADReferenceName(c *C) { + r := NewRemoteHEADReferenceName("foo") + c.Assert(r.String(), Equals, "refs/remotes/foo/HEAD") +} + +func (s *ReferenceSuite) TestNewTagReferenceName(c *C) { + r := NewTagReferenceName("foo") + c.Assert(r.String(), Equals, "refs/tags/foo") +} + func (s *ReferenceSuite) TestIsBranch(c *C) { r := ExampleReferenceName c.Assert(r.IsBranch(), Equals, true) |