From 2beaf450a326f220fd98f2a9230135b551028016 Mon Sep 17 00:00:00 2001 From: Devin Ragotzy Date: Thu, 6 Aug 2020 09:48:39 -0400 Subject: [PATCH] Add a query_map field to ruma_api! lifetime test --- ruma-api/tests/ruma_api_lifetime.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ruma-api/tests/ruma_api_lifetime.rs b/ruma-api/tests/ruma_api_lifetime.rs index 37ce053e..b9c41076 100644 --- a/ruma-api/tests/ruma_api_lifetime.rs +++ b/ruma-api/tests/ruma_api_lifetime.rs @@ -70,7 +70,7 @@ mod full_request_response { ruma_api::ruma_api! { metadata: { description: "Does something.", - method: GET, + method: POST, name: "no_fields", path: "/_matrix/my/endpoint/:thing", rate_limited: false, @@ -84,6 +84,7 @@ mod full_request_response { pub thing: &'a str, #[ruma_api(header = CONTENT_TYPE)] pub stuff: &'a str, + pub more: OtherThing<'t>, } response: { @@ -121,8 +122,8 @@ mod full_request_response_with_query_map { request: { #[ruma_api(query_map)] - // pub abc: &'a [(&'a str, &'a str)], - pub abc: &'a [(String, String)], + // pub abc: &'a [(&'a str, &'a str)], // TODO This does not impl Deserialize + pub abc: Vec<(String, String)>, #[ruma_api(path)] pub thing: &'a str, #[ruma_api(header = CONTENT_TYPE)]