diff --git a/logger_test.go b/logger_test.go new file mode 100644 index 0000000..3048ca3 --- /dev/null +++ b/logger_test.go @@ -0,0 +1,19 @@ +package ksql + +import ( + "context" + "testing" + + tt "github.com/vingarcia/ksql/internal/testtools" +) + +func TestCtxLog(t *testing.T) { + ctx := context.Background() + + t.Run("should not log anything nor panic if logger is nil", func(t *testing.T) { + panicPayload := tt.PanicHandler(func() { + ctxLog(ctx, "fakeQuery", []interface{}{}, nil) + }) + tt.AssertEqual(t, panicPayload, nil) + }) +}