From 7f1fe57935c30b5568722b4b0733a85e6b99a967 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 10 Oct 2026 09:02:18 -0400 Subject: [PATCH] fix: the search test reads the last pass as JSON, since jsonb respaces it (M502 #5521) Co-Authored-By: Claude Opus 5.5 --- internal/wanted/search_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/wanted/search_test.go b/internal/wanted/search_test.go index 1e96274f..a96ce3ea 100644 --- a/internal/wanted/search_test.go +++ b/internal/wanted/search_test.go @@ -117,8 +117,9 @@ func TestSearcher_FindsAndTakesAWant_Integration(t *testing.T) { t.Errorf("grab = %+v", g) } settings, _ := q.GetAcquisitionSettings(ctx) - if !settings.LastPassAt.Valid || !strings.Contains(string(settings.LastPass), `"grabbed":1`) { - t.Errorf("last pass = %s", settings.LastPass) + var last Report + if err := json.Unmarshal(settings.LastPass, &last); err != nil || !settings.LastPassAt.Valid || last.Grabbed != 1 { + t.Errorf("last pass = %s (%v)", settings.LastPass, err) } // A want with a download running is not searched again.