summaryrefslogtreecommitdiffstats
path: root/tests/parse_es_requests.rs
blob: 01ea64a10878bc912029092ab8ab48d6c8d9b8fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

use es_public_proxy::ApiBody;

mod common;

#[test]
fn basic_load() {
    let request = common::load_request("GET_search");
    assert_eq!(request.method, "GET");
    assert_eq!(request.path_and_query, "/_search");
}

#[test]
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();
}