mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-29 16:24:26 +01:00
Fix tests
This commit is contained in:
parent
0250ea9157
commit
3517eae47f
@ -868,7 +868,12 @@ async fn error_add_documents_bad_document_id() {
|
|||||||
let (response, code) = index.get_task(1).await;
|
let (response, code) = index.get_task(1).await;
|
||||||
assert_eq!(code, 200);
|
assert_eq!(code, 200);
|
||||||
assert_eq!(response["status"], json!("failed"));
|
assert_eq!(response["status"], json!("failed"));
|
||||||
assert_eq!(response["error"]["message"], json!("Document identifier `foo & bar` is invalid. A document identifier can be of type integer or string, only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_)."));
|
assert_eq!(
|
||||||
|
response["error"]["message"],
|
||||||
|
json!(
|
||||||
|
r#"Document identifier `"foo & bar"` is invalid. A document identifier can be of type integer or string, only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_)."#
|
||||||
|
)
|
||||||
|
);
|
||||||
assert_eq!(response["error"]["code"], json!("invalid_document_id"));
|
assert_eq!(response["error"]["code"], json!("invalid_document_id"));
|
||||||
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@ -891,7 +896,12 @@ async fn error_update_documents_bad_document_id() {
|
|||||||
index.update_documents(documents, None).await;
|
index.update_documents(documents, None).await;
|
||||||
let response = index.wait_task(1).await;
|
let response = index.wait_task(1).await;
|
||||||
assert_eq!(response["status"], json!("failed"));
|
assert_eq!(response["status"], json!("failed"));
|
||||||
assert_eq!(response["error"]["message"], json!("Document identifier `foo & bar` is invalid. A document identifier can be of type integer or string, only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_)."));
|
assert_eq!(
|
||||||
|
response["error"]["message"],
|
||||||
|
json!(
|
||||||
|
r#"Document identifier `"foo & bar"` is invalid. A document identifier can be of type integer or string, only composed of alphanumeric characters (a-z A-Z 0-9), hyphens (-) and underscores (_)."#
|
||||||
|
)
|
||||||
|
);
|
||||||
assert_eq!(response["error"]["code"], json!("invalid_document_id"));
|
assert_eq!(response["error"]["code"], json!("invalid_document_id"));
|
||||||
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
assert_eq!(response["error"]["type"], json!("invalid_request"));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
Loading…
Reference in New Issue
Block a user