mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
clippy + fmt
This commit is contained in:
committed by
qdequele
parent
22fbff98d4
commit
6a1f73a304
@ -91,11 +91,11 @@ fn check_add_documents_with_nested_null() {
|
||||
|
||||
// 2 - Add a document that contains a null in a nested object
|
||||
|
||||
let body = json!([{
|
||||
"id": 0,
|
||||
"foo": {
|
||||
let body = json!([{
|
||||
"id": 0,
|
||||
"foo": {
|
||||
"bar": null
|
||||
}
|
||||
}
|
||||
}]);
|
||||
|
||||
let url = "/indexes/tasks/documents";
|
||||
@ -126,9 +126,9 @@ fn check_add_documents_with_nested_sequence() {
|
||||
|
||||
// 2 - Add a document that contains a seq in a nested object
|
||||
|
||||
let body = json!([{
|
||||
"id": 0,
|
||||
"foo": {
|
||||
let body = json!([{
|
||||
"id": 0,
|
||||
"foo": {
|
||||
"bar": [123,456],
|
||||
"fez": [{
|
||||
"id": 255,
|
||||
|
@ -660,7 +660,7 @@ fn check_add_documents_without_primary_key() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_first_update_should_bring_up_processed_status_after_first_docs_addition(){
|
||||
fn check_first_update_should_bring_up_processed_status_after_first_docs_addition() {
|
||||
let mut server = common::Server::with_uid("movies");
|
||||
|
||||
let body = json!({
|
||||
@ -678,11 +678,11 @@ fn check_first_update_should_bring_up_processed_status_after_first_docs_addition
|
||||
|
||||
// 2. Index the documents from movies.json, present inside of assets directory
|
||||
server.add_or_replace_multiple_documents(body);
|
||||
|
||||
|
||||
// 3. Fetch the status of the indexing done above.
|
||||
let (response, status_code) = server.get_all_updates_status();
|
||||
|
||||
|
||||
// 4. Verify the fetch is successful and indexing status is 'processed'
|
||||
assert_eq!(status_code, 200);
|
||||
assert_eq!(response[0]["status"], "processed");
|
||||
assert_eq!(response[0]["status"], "processed");
|
||||
}
|
||||
|
@ -289,10 +289,9 @@ fn index_new_fields_false_then_true() {
|
||||
assert_json_eq!(response, expected);
|
||||
}
|
||||
|
||||
|
||||
// Fix issue https://github.com/meilisearch/MeiliSearch/issues/518
|
||||
#[test]
|
||||
fn accept_new_fields_does_not_take_into_account_the_primary_key () {
|
||||
fn accept_new_fields_does_not_take_into_account_the_primary_key() {
|
||||
let mut server = common::Server::with_uid("movies");
|
||||
|
||||
// 1 - Create an index with no primary-key
|
||||
|
@ -148,10 +148,7 @@ fn write_custom_ranking_and_index_documents() {
|
||||
|
||||
// 1 - Add ranking rules with one custom ranking on a string
|
||||
|
||||
let body = json!([
|
||||
"asc(title)",
|
||||
"typo"
|
||||
]);
|
||||
let body = json!(["asc(title)", "typo"]);
|
||||
|
||||
server.update_ranking_rules(body);
|
||||
|
||||
@ -184,5 +181,4 @@ fn write_custom_ranking_and_index_documents() {
|
||||
assert_eq!(status_code, 200);
|
||||
|
||||
assert_json_eq!(response, expected, ordered: false);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user