mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-02-17 08:10:14 +08:00
test attributesToRetrieve
This commit is contained in:
parent
2bd5d2474e
commit
90cf4b9462
@ -554,6 +554,16 @@ async fn search_with_attributes_to_retrieve() {
|
|||||||
test_post_get_search!(server, query, |response, _status_code| {
|
test_post_get_search!(server, query, |response, _status_code| {
|
||||||
assert_json_eq!(expected.clone(), response["hits"].clone(), ordered: false);
|
assert_json_eq!(expected.clone(), response["hits"].clone(), ordered: false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let query = json!({
|
||||||
|
"q": "cherry",
|
||||||
|
"limit": 1,
|
||||||
|
"attributesToRetrieve": [],
|
||||||
|
});
|
||||||
|
|
||||||
|
test_post_get_search!(server, query, |response, _status_code| {
|
||||||
|
assert_json_eq!(json!([{}]), response["hits"].clone(), ordered: false);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user