diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-08-25 18:09:18 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-08-25 18:15:53 -0700 |
commit | 55f9b88ba1d63db75ef9cde3cf94e5c98526ad2f (patch) | |
tree | 68d31143996afce99dfa346042c1123dd944f766 /tests/parse_es_requests.rs | |
parent | a66caf9b7ae476f526a706d31ed5ef4f8d361b00 (diff) | |
download | es-public-proxy-55f9b88ba1d63db75ef9cde3cf94e5c98526ad2f.tar.gz es-public-proxy-55f9b88ba1d63db75ef9cde3cf94e5c98526ad2f.zip |
significant increase in parse and test coverage
Diffstat (limited to 'tests/parse_es_requests.rs')
-rw-r--r-- | tests/parse_es_requests.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/parse_es_requests.rs b/tests/parse_es_requests.rs index d453392..8e84148 100644 --- a/tests/parse_es_requests.rs +++ b/tests/parse_es_requests.rs @@ -36,7 +36,9 @@ fn parse_search_bodies() { if let Some(body) = parts.body { println!("parsing: {}", path.display()); println!("BODY: {}", body); - let _parsed: SearchBody = serde_json::from_str(&body).unwrap(); + let parsed: SearchBody = serde_json::from_str(&body).unwrap(); + let raw_val: serde_json::Value = serde_json::from_str(&body).unwrap(); + assert_eq!(raw_val, serde_json::to_value(parsed).unwrap()); } } } |