Add tests for only and except of post-processors

pull/2171/head
James G. Kim 11 years ago
parent a5818b158f
commit d7c77895dc

@ -174,6 +174,40 @@ func TestParse(t *testing.T) {
false,
},
{
"parse-pp-only.json",
&Template{
PostProcessors: [][]*PostProcessor{
[]*PostProcessor{
&PostProcessor{
Type: "foo",
OnlyExcept: OnlyExcept{
Only: []string{"bar"},
},
},
},
},
},
false,
},
{
"parse-pp-except.json",
&Template{
PostProcessors: [][]*PostProcessor{
[]*PostProcessor{
&PostProcessor{
Type: "foo",
OnlyExcept: OnlyExcept{
Except: []string{"bar"},
},
},
},
},
},
false,
},
{
"parse-pp-string.json",
&Template{

@ -0,0 +1,8 @@
{
"post-processors": [
{
"type": "foo",
"except": ["bar"]
}
]
}

@ -0,0 +1,8 @@
{
"post-processors": [
{
"type": "foo",
"only": ["bar"]
}
]
}
Loading…
Cancel
Save