fix(tests): correct error type assertions in proxy DAO tests

The tests expected AppError::InvalidInput but the DAO functions use
AppError::localized() which returns AppError::Localized variant.
Updated assertions to match the correct error type with key validation.
This commit is contained in:
Jason
2026-01-27 10:41:16 +08:00
parent 8c20c57b29
commit eec05e704f
+4 -2
View File
@@ -875,7 +875,8 @@ mod tests {
.set_default_cost_multiplier("claude", "not-a-number")
.await
.unwrap_err();
assert!(matches!(err, AppError::InvalidInput(_)));
// AppError::localized returns AppError::Localized variant
assert!(matches!(err, AppError::Localized { key: "error.invalidMultiplier", .. }));
Ok(())
}
@@ -895,7 +896,8 @@ mod tests {
.set_pricing_model_source("claude", "invalid")
.await
.unwrap_err();
assert!(matches!(err, AppError::InvalidInput(_)));
// AppError::localized returns AppError::Localized variant
assert!(matches!(err, AppError::Localized { key: "error.invalidPricingMode", .. }));
Ok(())
}