Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(attachments): assert on fallback text block directly

Steven Enamakelde028533f8b7
diff --git a/crates/openhuman-core/src/attachments/provider_routing_tests.rs b/crates/openhuman-core/src/attachments/provider_routing_tests.rs
index 3e6faaa030..97208dbfdd 100644
--- a/crates/openhuman-core/src/attachments/provider_routing_tests.rs
+++ b/crates/openhuman-core/src/attachments/provider_routing_tests.rs
@@ -319,10 +319,11 @@ async fn disabled_tinydocs_fallback_runs_through_the_owner_wrapper_without_cachi
let Message::User(user) = &captured[0].1.messages[0] else {
panic!("expected user message")
};
- assert!(user.content[0]
- .text()
- .contains("Document extraction is disabled"));
- assert!(user.content[0].text().contains("brief.pdf"));
+ let ContentBlock::Text(fallback) = &user.content[0] else {
+ panic!("expected document fallback text")
+ };
+ assert!(fallback.contains("Document extraction is disabled"));
+ assert!(fallback.contains("brief.pdf"));
assert!(!path
.parent()
.unwrap()