(c *C)
| 52 | } |
| 53 | |
| 54 | func (s *SuiteCommit) TestParents(c *C) { |
| 55 | expected := []string{ |
| 56 | "35e85108805c84807bc66a02d91535e1e24b38b9", |
| 57 | "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69", |
| 58 | } |
| 59 | |
| 60 | var output []string |
| 61 | i := s.Commit.Parents() |
| 62 | err := i.ForEach(func(commit *Commit) error { |
| 63 | output = append(output, commit.ID().String()) |
| 64 | return nil |
| 65 | }) |
| 66 | |
| 67 | c.Assert(err, IsNil) |
| 68 | c.Assert(output, DeepEquals, expected) |
| 69 | |
| 70 | i.Close() |
| 71 | } |
| 72 | |
| 73 | func (s *SuiteCommit) TestParent(c *C) { |
| 74 | commit, err := s.Commit.Parent(1) |