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")