fixup tests for router change
Signed-off-by: Wolfgang Bumiller <w.bumiller@errno.eu>
This commit is contained in:
parent
8b77b3d08c
commit
a7b9c8d89e
@ -106,7 +106,7 @@ fn check_body(router: &Router<Bytes>, 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");
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user