From 63d132d83f804146469a9267a8892cf053e145f9 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 16 Jun 2025 16:31:34 +0200 Subject: [PATCH] testing --- src/actix_web/inbox.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/actix_web/inbox.rs b/src/actix_web/inbox.rs index 354f488..97249a9 100644 --- a/src/actix_web/inbox.rs +++ b/src/actix_web/inbox.rs @@ -132,14 +132,14 @@ mod test { #[tokio::test] async fn test_receive_activity_hook() { let (body, incoming_request, config) = setup_receive_test().await; - receive_activity_with_hook::( + let res = receive_activity_with_hook::( incoming_request.to_http_request(), body, inbox_activity_hook, &config.to_request_data(), ) - .await - .unwrap(); + .await; + assert_eq!(res.err(), Some(Error::Other("test-error".to_string()))); } async fn inbox_activity_hook( @@ -147,9 +147,8 @@ mod test { _actor: ActorT, _context: Data, ) -> Result<(), Error> { - // TODO: test that this actually gets called - //todo!(); - Ok(()) + // ensure that hook gets called by returning this value + Err(Error::Other("test-error".to_string())) } #[tokio::test]