From 9d22f9696ae2892f07ecdb4750ff9ef47ddedc89 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Mon, 8 Nov 2021 23:02:01 +0700 Subject: [PATCH] test: wrong logic --- api/core/joke/getter_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/joke/getter_test.go b/api/core/joke/getter_test.go index 4de0fda..54783bb 100644 --- a/api/core/joke/getter_test.go +++ b/api/core/joke/getter_test.go @@ -249,8 +249,8 @@ func TestGetCachedJokeByID(t *testing.T) { } k, err := joke.GetCachedJokeByID(memory, 4) - if err == nil { - t.Error("an error was not thrown, k:", k) + if err != nil { + t.Error("an error was thrown:", err) } if k != "" {