diff options
Diffstat (limited to 'config/branch_test.go')
-rw-r--r-- | config/branch_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config/branch_test.go b/config/branch_test.go index d74122e..6d9ca86 100644 --- a/config/branch_test.go +++ b/config/branch_test.go @@ -38,12 +38,13 @@ func (b *BranchSuite) TestValidateMerge(c *C) { c.Assert(badBranch.Validate(), NotNil) } -func (b *BranchSuite) TestMarshall(c *C) { +func (b *BranchSuite) TestMarshal(c *C) { expected := []byte(`[core] bare = false [branch "branch-tracking-on-clone"] remote = fork merge = refs/heads/branch-tracking-on-clone + rebase = interactive `) cfg := NewConfig() @@ -51,6 +52,7 @@ func (b *BranchSuite) TestMarshall(c *C) { Name: "branch-tracking-on-clone", Remote: "fork", Merge: plumbing.ReferenceName("refs/heads/branch-tracking-on-clone"), + Rebase: "interactive", } actual, err := cfg.Marshal() @@ -58,12 +60,13 @@ func (b *BranchSuite) TestMarshall(c *C) { c.Assert(string(actual), Equals, string(expected)) } -func (b *BranchSuite) TestUnmarshall(c *C) { +func (b *BranchSuite) TestUnmarshal(c *C) { input := []byte(`[core] bare = false [branch "branch-tracking-on-clone"] remote = fork merge = refs/heads/branch-tracking-on-clone + rebase = interactive `) cfg := NewConfig() @@ -73,4 +76,5 @@ func (b *BranchSuite) TestUnmarshall(c *C) { c.Assert(branch.Name, Equals, "branch-tracking-on-clone") c.Assert(branch.Remote, Equals, "fork") c.Assert(branch.Merge, Equals, plumbing.ReferenceName("refs/heads/branch-tracking-on-clone")) + c.Assert(branch.Rebase, Equals, "interactive") } |