mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
Rename function, add trailing line, replace JSON string with macro
This commit is contained in:
parent
51472142c6
commit
fbf7117d6a
@ -79,7 +79,7 @@ fn check_add_documents_with_nested_boolean() {
|
||||
|
||||
// Test issue https://github.com/meilisearch/MeiliSearch/issues/571
|
||||
#[test]
|
||||
fn check_add_documents_with_nested_sequence() {
|
||||
fn check_add_documents_with_nested_null() {
|
||||
let mut server = common::Server::with_uid("tasks");
|
||||
|
||||
// 1 - Create the index with no primary_key
|
||||
@ -91,7 +91,12 @@ fn check_add_documents_with_nested_sequence() {
|
||||
|
||||
// 2 - Add a document that contains a null in a nested object
|
||||
|
||||
let body = serde_json::from_str("[{\"id\":0,\"foo\":{\"bar\":null}}]").unwrap();
|
||||
let body = json!([{
|
||||
"id": 0,
|
||||
"foo": {
|
||||
"bar": null
|
||||
}
|
||||
}]);
|
||||
|
||||
let url = "/indexes/tasks/documents";
|
||||
let (response, status_code) = server.post_request(&url, body);
|
||||
@ -105,4 +110,4 @@ fn check_add_documents_with_nested_sequence() {
|
||||
let (response, status_code) = server.get_update_status(update_id);
|
||||
assert_eq!(status_code, 200);
|
||||
assert_eq!(response["status"], "processed");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user