diff options
Diffstat (limited to 'plumbing/format/index/encoder_test.go')
-rw-r--r-- | plumbing/format/index/encoder_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plumbing/format/index/encoder_test.go b/plumbing/format/index/encoder_test.go index 914ee26..a6a0ea2 100644 --- a/plumbing/format/index/encoder_test.go +++ b/plumbing/format/index/encoder_test.go @@ -26,6 +26,11 @@ func (s *IndexSuite) TestEncode(c *C) { }, { CreatedAt: time.Now(), ModifiedAt: time.Now(), + Name: "bar", + Size: 82, + }, { + CreatedAt: time.Now(), + ModifiedAt: time.Now(), Name: strings.Repeat(" ", 20), Size: 82, }}, @@ -42,6 +47,11 @@ func (s *IndexSuite) TestEncode(c *C) { c.Assert(err, IsNil) c.Assert(idx, DeepEquals, output) + + c.Assert(output.Entries[0].Name, Equals, strings.Repeat(" ", 20)) + c.Assert(output.Entries[1].Name, Equals, "bar") + c.Assert(output.Entries[2].Name, Equals, "foo") + } func (s *IndexSuite) TestEncodeUnsuportedVersion(c *C) { |