mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
@@ -156,3 +156,15 @@ func TestParamsSetAndMerge(t *testing.T) {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func TestParamsIsZero(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
|
||||
var nilParams Params
|
||||
|
||||
c.Assert(Params{}.IsZero(), qt.IsTrue)
|
||||
c.Assert(nilParams.IsZero(), qt.IsTrue)
|
||||
c.Assert(Params{"foo": "bar"}.IsZero(), qt.IsFalse)
|
||||
c.Assert(Params{"_merge": "foo", "foo": "bar"}.IsZero(), qt.IsFalse)
|
||||
c.Assert(Params{"_merge": "foo"}.IsZero(), qt.IsTrue)
|
||||
}
|
||||
|
Reference in New Issue
Block a user