MCPcopy
hub / github.com/go-git/go-git / TestCreateBranchInvalid

Method TestCreateBranchInvalid

repository_test.go:600–615  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

598}
599
600func (s *RepositorySuite) TestCreateBranchInvalid(c *C) {
601 r, _ := Init(memory.NewStorage(), nil)
602 err := r.CreateBranch(&config.Branch{})
603
604 c.Assert(err, NotNil)
605
606 testBranch := &config.Branch{
607 Name: "foo",
608 Remote: "origin",
609 Merge: "refs/heads/foo",
610 }
611 err = r.CreateBranch(testBranch)
612 c.Assert(err, IsNil)
613 err = r.CreateBranch(testBranch)
614 c.Assert(err, NotNil)
615}
616
617func (s *RepositorySuite) TestDeleteBranch(c *C) {
618 r, _ := Init(memory.NewStorage(), nil)

Callers

nothing calls this directly

Calls 3

NewStorageFunction · 0.92
InitFunction · 0.85
CreateBranchMethod · 0.80

Tested by

no test coverage detected