diff --git a/proxmox-api-macro/tests/basic.rs b/proxmox-api-macro/tests/basic.rs index b1eb132a..7dfb78de 100644 --- a/proxmox-api-macro/tests/basic.rs +++ b/proxmox-api-macro/tests/basic.rs @@ -106,7 +106,7 @@ fn check_body(router: &Router, path: &str, expect: &'static str) { .get .as_ref() .expect("expected GET method on router at path"); - let fut = method.call(parameters.unwrap_or(Value::Null)); + let fut = method.call(parameters.map(Value::Object).unwrap_or(Value::Null)); let resp = futures::executor::block_on(fut) .expect("expected `GET` on test_body to return successfully"); assert!(resp.status() == 200, "test response should have status 200"); diff --git a/proxmox-api/tests/router.rs b/proxmox-api/tests/router.rs index aacfbc5b..3a41933e 100644 --- a/proxmox-api/tests/router.rs +++ b/proxmox-api/tests/router.rs @@ -1,6 +1,7 @@ #![feature(async_await)] use bytes::Bytes; +use serde_json::Value; use proxmox_api::Router; @@ -65,7 +66,7 @@ fn check_with_matched_params( .get .as_ref() .expect(&format!("expected GET method on {}", path)) - .call(params); + .call(Value::Object(params)); let response = futures::executor::block_on(apifut) .expect("expected the simple test api function to be ready immediately");