(c *C)
| 23 | var _ = Suite(&CommitStatsSuite{}) |
| 24 | |
| 25 | func (s *CommitStatsSuite) TestStats(c *C) { |
| 26 | r, hash := s.writeHistory(c, []byte("foo\n"), []byte("foo\nbar\n")) |
| 27 | |
| 28 | aCommit, err := r.CommitObject(hash) |
| 29 | c.Assert(err, IsNil) |
| 30 | |
| 31 | fileStats, err := aCommit.StatsContext(context.Background()) |
| 32 | c.Assert(err, IsNil) |
| 33 | |
| 34 | c.Assert(fileStats[0].Name, Equals, "foo") |
| 35 | c.Assert(fileStats[0].Addition, Equals, 1) |
| 36 | c.Assert(fileStats[0].Deletion, Equals, 0) |
| 37 | c.Assert(fileStats[0].String(), Equals, " foo | 1 +\n") |
| 38 | } |
| 39 | |
| 40 | func (s *CommitStatsSuite) TestStats_RootCommit(c *C) { |
| 41 | r, hash := s.writeHistory(c, []byte("foo\n")) |
nothing calls this directly
no test coverage detected