(c *C)
| 416 | } |
| 417 | |
| 418 | func (s *RepositorySuite) TestCreateBranchAndBranch(c *C) { |
| 419 | r, _ := Init(memory.NewStorage(), nil) |
| 420 | testBranch := &config.Branch{ |
| 421 | Name: "foo", |
| 422 | Remote: "origin", |
| 423 | Merge: "refs/heads/foo", |
| 424 | } |
| 425 | err := r.CreateBranch(testBranch) |
| 426 | |
| 427 | c.Assert(err, IsNil) |
| 428 | cfg, err := r.Config() |
| 429 | c.Assert(err, IsNil) |
| 430 | c.Assert(len(cfg.Branches), Equals, 1) |
| 431 | branch := cfg.Branches["foo"] |
| 432 | c.Assert(branch.Name, Equals, testBranch.Name) |
| 433 | c.Assert(branch.Remote, Equals, testBranch.Remote) |
| 434 | c.Assert(branch.Merge, Equals, testBranch.Merge) |
| 435 | |
| 436 | branch, err = r.Branch("foo") |
| 437 | c.Assert(err, IsNil) |
| 438 | c.Assert(branch.Name, Equals, testBranch.Name) |
| 439 | c.Assert(branch.Remote, Equals, testBranch.Remote) |
| 440 | c.Assert(branch.Merge, Equals, testBranch.Merge) |
| 441 | } |
| 442 | |
| 443 | func (s *RepositorySuite) TestMergeFF(c *C) { |
| 444 | r, err := Init(memory.NewStorage(), memfs.New()) |
nothing calls this directly
no test coverage detected