diff --git a/helper/config/decode_test.go b/helper/config/decode_test.go index a04329f27..b08fb2af1 100644 --- a/helper/config/decode_test.go +++ b/helper/config/decode_test.go @@ -13,6 +13,7 @@ func TestDecode(t *testing.T) { Name string Address string Time time.Duration + Trilean Trilean } cases := map[string]struct { @@ -23,13 +24,27 @@ func TestDecode(t *testing.T) { "basic": { []interface{}{ map[string]interface{}{ - "name": "bar", - "time": "5s", + "name": "bar", + "time": "5s", + "trilean": "true", }, }, &Target{ - Name: "bar", - Time: 5 * time.Second, + Name: "bar", + Time: 5 * time.Second, + Trilean: TriTrue, + }, + nil, + }, + + "empty-string-trilean": { + []interface{}{ + map[string]interface{}{ + "trilean": "", + }, + }, + &Target{ + Trilean: TriUnset, }, nil, },