From f41fbc8baf6fe8d592c21bfbd8449b72e9ddd1ef Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Tue, 24 Nov 2020 19:24:35 +0100 Subject: [PATCH] Fix test --- src/tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests.rs b/src/tests.rs index eeef7b0..15642b5 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -37,7 +37,9 @@ macro_rules! test_service { #[actix_rt::test] async fn test_index() { - let mut app = test::init_service(App::new().service(index)).await; + std::env::set_var("HOC_BASE_URL", "http://0.0.0.0:8080"); + + let mut app = test_app!(index); let req = dbg!(test::TestRequest::with_uri("/").to_request()); let resp = dbg!(test::call_service(&mut app, req).await);