aboutsummaryrefslogtreecommitdiffstats
path: root/config/config_test.go
diff options
context:
space:
mode:
authorpaul.t <paul.t@gembaadvantage.com>2021-12-15 06:32:38 +0000
committerpaul.t <paul.t@gembaadvantage.com>2021-12-15 06:32:38 +0000
commit8d923a6fb77d7916da2df33e5a65e038cceef4e1 (patch)
tree5a823fa6e7ffd5e38df105cadcab5a0d6b7475e9 /config/config_test.go
parentb0f5eb894deb6d6a1051d697f0809082abfad395 (diff)
parent53a714bdc90026135e2f2ada1c4d6c925b2733cd (diff)
downloadgo-git-8d923a6fb77d7916da2df33e5a65e038cceef4e1.tar.gz
Merge branch 'master' into codecommit-ref-delta
Diffstat (limited to 'config/config_test.go')
-rw-r--r--config/config_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/config/config_test.go b/config/config_test.go
index 6f0242d..7e9483f 100644
--- a/config/config_test.go
+++ b/config/config_test.go
@@ -50,6 +50,7 @@ func (s *ConfigSuite) TestUnmarshal(c *C) {
[branch "master"]
remote = origin
merge = refs/heads/master
+ description = "Add support for branch description.\\n\\nEdit branch description: git branch --edit-description\\n"
[init]
defaultBranch = main
[url "ssh://git@github.com/"]
@@ -86,6 +87,7 @@ func (s *ConfigSuite) TestUnmarshal(c *C) {
c.Assert(cfg.Submodules["qux"].Branch, Equals, "bar")
c.Assert(cfg.Branches["master"].Remote, Equals, "origin")
c.Assert(cfg.Branches["master"].Merge, Equals, plumbing.ReferenceName("refs/heads/master"))
+ c.Assert(cfg.Branches["master"].Description, Equals, "Add support for branch description.\n\nEdit branch description: git branch --edit-description\n")
c.Assert(cfg.Init.DefaultBranch, Equals, "main")
}
@@ -111,6 +113,7 @@ func (s *ConfigSuite) TestMarshal(c *C) {
[branch "master"]
remote = origin
merge = refs/heads/master
+ description = "Add support for branch description.\\n\\nEdit branch description: git branch --edit-description\\n"
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
[init]
@@ -149,9 +152,10 @@ func (s *ConfigSuite) TestMarshal(c *C) {
}
cfg.Branches["master"] = &Branch{
- Name: "master",
- Remote: "origin",
- Merge: "refs/heads/master",
+ Name: "master",
+ Remote: "origin",
+ Merge: "refs/heads/master",
+ Description: "Add support for branch description.\n\nEdit branch description: git branch --edit-description\n",
}
cfg.URLs["ssh://git@github.com/"] = &URL{
@@ -361,7 +365,9 @@ func (s *ConfigSuite) TestRemoveUrlOptions(c *C) {
cfg.Remotes["alt"].URLs = []string{}
buf, err = cfg.Marshal()
+ c.Assert(err, IsNil)
if strings.Contains(string(buf), "url") {
c.Fatal("conifg should not contain any url sections")
}
+ c.Assert(err, IsNil)
}