aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/files/GET_uri_search.txt1
-rw-r--r--tests/parse_es_requests.rs4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/files/GET_uri_search.txt b/tests/files/GET_uri_search.txt
new file mode 100644
index 0000000..e5e0567
--- /dev/null
+++ b/tests/files/GET_uri_search.txt
@@ -0,0 +1 @@
+GET /my-index-000001/_search?q=user.id:kimchy
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();
}