From 004a7f84ef5069517bbb2a28e861fb6882ae5bc3 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 11 Apr 2016 21:08:30 +0200 Subject: [PATCH] Make test case less dependent on exact error string (#741) --- middleware/context_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/middleware/context_test.go b/middleware/context_test.go index e0c91f646..a61a3bf92 100644 --- a/middleware/context_test.go +++ b/middleware/context_test.go @@ -52,7 +52,13 @@ func TestInclude(t *testing.T) { fileContent: `str1 {{ .InvalidField }} str2`, expectedContent: "", 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`, }, }