mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
Make test case less dependent on exact error string (#741)
This commit is contained in:
parent
ed8a48e7f1
commit
004a7f84ef
1 changed files with 7 additions and 1 deletions
|
@ -52,7 +52,13 @@ func TestInclude(t *testing.T) {
|
||||||
fileContent: `str1 {{ .InvalidField }} str2`,
|
fileContent: `str1 {{ .InvalidField }} str2`,
|
||||||
expectedContent: "",
|
expectedContent: "",
|
||||||
shouldErr: true,
|
shouldErr: true,
|
||||||
expectedErrorContent: `InvalidField is not a field of struct type middleware.Context`,
|
expectedErrorContent: `InvalidField`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fileContent: `str1 {{ .InvalidField }} str2`,
|
||||||
|
expectedContent: "",
|
||||||
|
shouldErr: true,
|
||||||
|
expectedErrorContent: `type middleware.Context`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue