diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-27 01:49:58 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-27 01:49:58 +0100 |
commit | 7d6c5a56c0b63705378f125523876de1a97fd1ce (patch) | |
tree | 8945a8a02d53f36a64304beaf006c4f46d61da48 /internal/hash_test.go | |
parent | a2e49a59782a50a9ff116c6d17c6e3888502f2ad (diff) | |
download | go-git-7d6c5a56c0b63705378f125523876de1a97fd1ce.tar.gz |
tree and commit
Diffstat (limited to 'internal/hash_test.go')
-rw-r--r-- | internal/hash_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/hash_test.go b/internal/hash_test.go index 222f3b4..063bd23 100644 --- a/internal/hash_test.go +++ b/internal/hash_test.go @@ -25,3 +25,11 @@ func (s *HashSuite) TestNewHash(c *C) { c.Assert(hash, Equals, NewHash(hash.String())) } + +func (s *HashSuite) TestIsZero(c *C) { + hash := NewHash("foo") + c.Assert(hash.IsZero(), Equals, true) + + hash = NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d") + c.Assert(hash.IsZero(), Equals, false) +} |