From c92f90003f2292b978bd2d6c47260c732173c9fa Mon Sep 17 00:00:00 2001 From: Andrew Burian Date: Mon, 21 Nov 2016 10:16:24 -0800 Subject: [PATCH] Switched hardcoded string for const value --- json_formatter_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json_formatter_test.go b/json_formatter_test.go index 2f9dae7..51093a7 100644 --- a/json_formatter_test.go +++ b/json_formatter_test.go @@ -180,7 +180,7 @@ func TestJSONDisableTimestamp(t *testing.T) { t.Fatal("Unable to format entry: ", err) } s := string(b) - if strings.Contains(s, "time") { + if strings.Contains(s, FieldKeyTime) { t.Error("Did not prevent timestamp", s) } } @@ -193,7 +193,7 @@ func TestJSONEnableTimestamp(t *testing.T) { t.Fatal("Unable to format entry: ", err) } s := string(b) - if !strings.Contains(s, "time") { + if !strings.Contains(s, FieldKeyTime) { t.Error("Timestamp not present", s) } }