From f939132f38c5ec21e7c1098ebd26d47b6f8756f6 Mon Sep 17 00:00:00 2001 From: VinPropane Date: Sun, 24 May 2026 20:05:22 -0400 Subject: [PATCH] NEO-74: Fix recipe client HTTP error test signal capture. Use got-array lambda pattern; GDScript cannot assign outer locals from signal callbacks, which left failed_reason empty in CI GdUnit runs. --- client/test/recipe_definitions_client_test.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/test/recipe_definitions_client_test.gd b/client/test/recipe_definitions_client_test.gd index 820fdfc..85c9a7b 100644 --- a/client/test/recipe_definitions_client_test.gd +++ b/client/test/recipe_definitions_client_test.gd @@ -102,9 +102,10 @@ func test_http_error_emits_recipes_sync_failed_with_status() -> void: var transport := MockHttpTransport.new() transport.response_code = 503 var c := _make_client(transport) - var failed_reason := "" - c.connect("recipes_sync_failed", func(reason: String) -> void: failed_reason = reason) + var got: Array = [] + c.connect("recipes_sync_failed", func(reason: String) -> void: got.append(reason)) # Act c.call("request_sync_from_server") # Assert - assert_that(failed_reason).contains("503") + assert_that(got.size()).is_equal(1) + assert_that(str(got[0])).contains("503")