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]