mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
fix various bugs
This commit is contained in:
parent
7d9637861f
commit
e4d45b0500
7 changed files with 27 additions and 65 deletions
|
@ -13,12 +13,11 @@ async fn create_and_get_index() {
|
|||
|
||||
assert_eq!(code, 200);
|
||||
assert_eq!(response["uid"], "test");
|
||||
assert!(response.get("uuid").is_some());
|
||||
assert!(response.get("createdAt").is_some());
|
||||
assert!(response.get("updatedAt").is_some());
|
||||
assert_eq!(response["createdAt"], response["updatedAt"]);
|
||||
assert_eq!(response["primaryKey"], Value::Null);
|
||||
assert_eq!(response.as_object().unwrap().len(), 5);
|
||||
assert_eq!(response.as_object().unwrap().len(), 4);
|
||||
}
|
||||
|
||||
// TODO: partial test since we are testing error, amd error is not yet fully implemented in
|
||||
|
@ -30,7 +29,7 @@ async fn get_unexisting_index() {
|
|||
|
||||
let (_response, code) = index.get().await;
|
||||
|
||||
assert_eq!(code, 400);
|
||||
assert_eq!(code, 404);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
@ -55,5 +54,4 @@ async fn list_multiple_indexes() {
|
|||
assert_eq!(arr.len(), 2);
|
||||
assert!(arr.iter().find(|entry| entry["uid"] == "test" && entry["primaryKey"] == Value::Null).is_some());
|
||||
assert!(arr.iter().find(|entry| entry["uid"] == "test1" && entry["primaryKey"] == "key").is_some());
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue