hugolib: Fix broken test
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 17 Apr 2018 08:28:32 +0000 (10:28 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 17 Apr 2018 08:28:32 +0000 (10:28 +0200)
hugolib/page_test.go

index 308bf31cb3f4dbdcb595e7cca5e5f5d5508df1cc..f47f4944ff2af8b945466399df45431f6a9390cf 100644 (file)
@@ -448,7 +448,7 @@ func checkError(t *testing.T, err error, expected string) {
        if err == nil {
                t.Fatalf("err is nil.  Expected: %s", expected)
        }
-       if err.Error() != expected {
+       if !strings.Contains(err.Error(), expected) {
                t.Errorf("err.Error() returned: '%s'.  Expected: '%s'", err.Error(), expected)
        }
 }