api-macro: more tests

Note that this one tests the fact that we do not do output
schema validation!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-01-08 10:58:26 +01:00
parent 58158b495e
commit 943bc4de52

View File

@ -313,4 +313,12 @@ fn test_invocations() {
assert_eq!(login["username"], "hello");
assert_eq!(login["ticket"], "<TICKET>");
assert_eq!(login["CSRFPreventionToken"], "<TOKEN>");
let login = api_function_create_ticket_direct(
json!({"username":"hello","password":"world"}),
&API_METHOD_CREATE_TICKET,
&mut env,
)
.expect("expected a ticket");
assert_eq!(login, "an:invalid:ticket");
}