(c *C)
| 2412 | } |
| 2413 | |
| 2414 | func (s *RepositorySuite) TestCommits(c *C) { |
| 2415 | r, _ := Init(memory.NewStorage(), nil) |
| 2416 | err := r.clone(context.Background(), &CloneOptions{URL: s.GetBasicLocalRepositoryURL()}) |
| 2417 | c.Assert(err, IsNil) |
| 2418 | |
| 2419 | count := 0 |
| 2420 | commits, err := r.CommitObjects() |
| 2421 | c.Assert(err, IsNil) |
| 2422 | for { |
| 2423 | commit, err := commits.Next() |
| 2424 | if err != nil { |
| 2425 | break |
| 2426 | } |
| 2427 | |
| 2428 | count++ |
| 2429 | c.Assert(commit.Hash.IsZero(), Equals, false) |
| 2430 | c.Assert(commit.Hash, Equals, commit.ID()) |
| 2431 | c.Assert(commit.Type(), Equals, plumbing.CommitObject) |
| 2432 | } |
| 2433 | |
| 2434 | c.Assert(count, Equals, 9) |
| 2435 | } |
| 2436 | |
| 2437 | func (s *RepositorySuite) TestBlob(c *C) { |
| 2438 | r, _ := Init(memory.NewStorage(), nil) |
nothing calls this directly
no test coverage detected