mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-11-23 03:43:47 +01:00
Fix linter
This commit is contained in:
parent
7fed392e0c
commit
21c6776269
1 changed files with 2 additions and 1 deletions
|
@ -2824,11 +2824,12 @@ template ""}}`,
|
||||||
`We cannot {{- template "aa"}}`,
|
`We cannot {{- template "aa"}}`,
|
||||||
}
|
}
|
||||||
for _, disallowedTemplate := range disallowedTemplates {
|
for _, disallowedTemplate := range disallowedTemplates {
|
||||||
|
messageTemplate := disallowedTemplate
|
||||||
t.Run(disallowedTemplate, func(t *testing.T) {
|
t.Run(disallowedTemplate, func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
response := request(t, s, "PUT", `/mytopic`, `{}`, map[string]string{
|
response := request(t, s, "PUT", `/mytopic`, `{}`, map[string]string{
|
||||||
"Template": "yes",
|
"Template": "yes",
|
||||||
"Message": disallowedTemplate,
|
"Message": messageTemplate,
|
||||||
})
|
})
|
||||||
require.Equal(t, 400, response.Code)
|
require.Equal(t, 400, response.Code)
|
||||||
require.Equal(t, 40044, toHTTPError(t, response.Body.String()).Code)
|
require.Equal(t, 40044, toHTTPError(t, response.Body.String()).Code)
|
||||||
|
|
Loading…
Reference in a new issue