1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-23 03:43:47 +01:00

Fix linter

This commit is contained in:
binwiederhier 2024-03-25 09:34:44 -04:00
parent 7fed392e0c
commit 21c6776269

View file

@ -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)