From 9467dbdd40802eecd1b199c1e22d98b613133515 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sun, 5 Jul 2015 23:23:35 -0600 Subject: [PATCH] Fix errors tests --- middleware/errors/errors_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/middleware/errors/errors_test.go b/middleware/errors/errors_test.go index 66319f02..7f975bc9 100644 --- a/middleware/errors/errors_test.go +++ b/middleware/errors/errors_test.go @@ -9,6 +9,7 @@ import ( "net/http/httptest" "os" "path/filepath" + "strings" "testing" "github.com/mholt/caddy/middleware" @@ -109,7 +110,7 @@ func TestErrors(t *testing.T) { t.Errorf("Test %d: Expected body %q, but got %q", i, test.expectedBody, body) } - if log := buf.String(); log != test.expectedLog { + if log := buf.String(); !strings.Contains(log, test.expectedLog) { t.Errorf("Test %d: Expected log %q, but got %q", i, test.expectedLog, log) }