test: Add JSON logging handler to recur test

This commit is contained in:
Erik Winter 2024-12-11 08:46:38 +01:00 committed by Erik Winter (aider)
parent 191c3f34dc
commit c515b8f21e
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package main
import ( import (
"log/slog" "log/slog"
"os"
"testing" "testing"
"time" "time"
@ -13,7 +14,7 @@ func TestRecur(t *testing.T) {
now := time.Date(2024, 1, 1, 10, 0, 0, 0, time.UTC) now := time.Date(2024, 1, 1, 10, 0, 0, 0, time.UTC)
mem := NewMemory() mem := NewMemory()
rec := NewRecur(mem, mem, time.Second, slog.New()) rec := NewRecur(mem, mem, time.Second, slog.New(slog.NewJSONHandler(os.Stdout, nil)))
// Create a recurring item // Create a recurring item
recur := &item.Recur{ recur := &item.Recur{