aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parse_es_requests.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-22 15:41:49 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-22 15:41:49 -0700
commitbb552c9d0060cf49e187d1b06460a838ef19828d (patch)
treea1cb02c57a73e883a863f0520f435da207d4715f /tests/parse_es_requests.rs
parent754c2fa6b875b132ca39093678549b620e190817 (diff)
downloades-public-proxy-bb552c9d0060cf49e187d1b06460a838ef19828d.tar.gz
es-public-proxy-bb552c9d0060cf49e187d1b06460a838ef19828d.zip
start on test framework and query JSON parser
Diffstat (limited to 'tests/parse_es_requests.rs')
-rw-r--r--tests/parse_es_requests.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/parse_es_requests.rs b/tests/parse_es_requests.rs
index e918da9..01ea64a 100644
--- a/tests/parse_es_requests.rs
+++ b/tests/parse_es_requests.rs
@@ -1,4 +1,6 @@
+use es_public_proxy::ApiBody;
+
mod common;
#[test]
@@ -13,4 +15,6 @@ fn basic_parse() {
let request = common::load_request("GET_search");
assert_eq!(request.method, "GET");
assert_eq!(request.path_and_query, "/_search");
+
+ let thing: ApiBody = serde_json::from_str(&request.body.unwrap()).unwrap();
}