Tests for allow null to delete values key

reviewable/pr2648/r6
Scott Rigby 8 years ago
parent 4fc7792ad2
commit 4be00c51cc

@ -2,3 +2,9 @@ scope: moby
name: moby
override: bad
top: nope
bottom: exists
right: exists
left: exists
front: exists
back: exists
side: exists

@ -277,6 +277,12 @@ func ttpl(tpl string, v map[string]interface{}) (string, error) {
var testCoalesceValuesYaml = `
top: yup
bottom: null
right: Null
left: NULL
front: ~
back:
side: ""
global:
name: Ishmael
@ -316,6 +322,8 @@ func TestCoalesceValues(t *testing.T) {
expect string
}{
{"{{.top}}", "yup"},
// The keys bottom, right, left, front, and back should not be present.
{"{{.side}}", ""},
{"{{.name}}", "moby"},
{"{{.global.name}}", "Ishmael"},
{"{{.global.subject}}", "Queequeg"},

Loading…
Cancel
Save