From 943bc4de523ab30c3ac3df2785ce3b50f3c768d8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 8 Jan 2020 10:58:26 +0100 Subject: [PATCH] api-macro: more tests Note that this one tests the fact that we do not do output schema validation! Signed-off-by: Wolfgang Bumiller --- proxmox-api-macro/tests/api1.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proxmox-api-macro/tests/api1.rs b/proxmox-api-macro/tests/api1.rs index 99ac1b53..e3e7e822 100644 --- a/proxmox-api-macro/tests/api1.rs +++ b/proxmox-api-macro/tests/api1.rs @@ -313,4 +313,12 @@ fn test_invocations() { assert_eq!(login["username"], "hello"); assert_eq!(login["ticket"], ""); assert_eq!(login["CSRFPreventionToken"], ""); + + 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"); }