test: wrong logic

This commit is contained in:
Reinaldy Rafli 2021-11-08 23:02:01 +07:00
parent 843f1d77c3
commit 9d22f9696a
No known key found for this signature in database
GPG Key ID: CFDB9400255D8CB6
1 changed files with 2 additions and 2 deletions

View File

@ -249,8 +249,8 @@ func TestGetCachedJokeByID(t *testing.T) {
} }
k, err := joke.GetCachedJokeByID(memory, 4) k, err := joke.GetCachedJokeByID(memory, 4)
if err == nil { if err != nil {
t.Error("an error was not thrown, k:", k) t.Error("an error was thrown:", err)
} }
if k != "" { if k != "" {