aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/config/common_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/format/config/common_test.go')
-rw-r--r--plumbing/format/config/common_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/plumbing/format/config/common_test.go b/plumbing/format/config/common_test.go
index 365b53f..dca38df 100644
--- a/plumbing/format/config/common_test.go
+++ b/plumbing/format/config/common_test.go
@@ -64,6 +64,14 @@ func (s *CommonSuite) TestConfig_AddOption(c *C) {
c.Assert(obtained, DeepEquals, expected)
}
+func (s *CommonSuite) TestConfig_HasSection(c *C) {
+ sect := New().
+ AddOption("section1", "sub1", "key1", "value1").
+ AddOption("section1", "sub2", "key1", "value1")
+ c.Assert(sect.HasSection("section1"), Equals, true)
+ c.Assert(sect.HasSection("section2"), Equals, false)
+}
+
func (s *CommonSuite) TestConfig_RemoveSection(c *C) {
sect := New().
AddOption("section1", NoSubsection, "key1", "value1").