mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-11 11:42:15 +02:00
test: header/footer invalid templates
refs #2326 Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
parent
433335a2e1
commit
d4a455fc5a
@ -104,3 +104,23 @@ func TestDescribeBodyWithHeaderAndFooter(t *testing.T) {
|
||||
|
||||
golden.RequireEqual(t, out.Bytes())
|
||||
}
|
||||
|
||||
func TestDescribeBodyWithInvalidHeaderTemplate(t *testing.T) {
|
||||
ctx := context.New(config.Project{
|
||||
Release: config.Release{
|
||||
Header: "## {{ .Nop }\n",
|
||||
},
|
||||
})
|
||||
_, err := describeBody(ctx)
|
||||
require.EqualError(t, err, `template: tmpl:1: unexpected "}" in operand`)
|
||||
}
|
||||
|
||||
func TestDescribeBodyWithInvalidFooterTemplate(t *testing.T) {
|
||||
ctx := context.New(config.Project{
|
||||
Release: config.Release{
|
||||
Footer: "{{ .Nops }",
|
||||
},
|
||||
})
|
||||
_, err := describeBody(ctx)
|
||||
require.EqualError(t, err, `template: tmpl:1: unexpected "}" in operand`)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user