From cd44da6bfa00ab46865035a0cbbea1aed8238795 Mon Sep 17 00:00:00 2001 From: topocount <17910833+topocount@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:14:23 -0500 Subject: [PATCH] fix: flaky cast validation test --- src/core/validations/cast_tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/validations/cast_tests.rs b/src/core/validations/cast_tests.rs index 0b8841ea..95d7ca24 100644 --- a/src/core/validations/cast_tests.rs +++ b/src/core/validations/cast_tests.rs @@ -104,7 +104,12 @@ mod tests { .iter() .map(|p| *p as u32) .collect(), - r#type: if body.cast_type == "CAST" { 0 } else { 1 }, + r#type: match body.cast_type.as_str() { + "CAST" => 0, + "LONG_CAST" => 1, + "TEN_K_CAST" => 2, + other => panic!("unknown cast type from API: {}", other), + }, parent: body.parent_cast_id.map(|p| { cast_add_body::Parent::ParentCastId(crate::proto::CastId { fid: p.fid,