mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Merge #88
88: restore name field in index meta r=MarinPostma a=MarinPostma Makes the IndexMetadata payload iso with legacy meilisearch and closes #67 Co-authored-by: mpostma <postma.marin@protonmail.com>
This commit is contained in:
commit
764ced8b5c
4 changed files with 13 additions and 8 deletions
|
@ -9,11 +9,12 @@ async fn create_index_no_primary_key() {
|
|||
|
||||
assert_eq!(code, 200);
|
||||
assert_eq!(response["uid"], "test");
|
||||
assert_eq!(response["name"], "test");
|
||||
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(), 4);
|
||||
assert_eq!(response.as_object().unwrap().len(), 5);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
@ -24,11 +25,12 @@ async fn create_index_with_primary_key() {
|
|||
|
||||
assert_eq!(code, 200);
|
||||
assert_eq!(response["uid"], "test");
|
||||
assert_eq!(response["name"], "test");
|
||||
assert!(response.get("createdAt").is_some());
|
||||
assert!(response.get("updatedAt").is_some());
|
||||
//assert_eq!(response["createdAt"], response["updatedAt"]);
|
||||
assert_eq!(response["primaryKey"], "primary");
|
||||
assert_eq!(response.as_object().unwrap().len(), 4);
|
||||
assert_eq!(response.as_object().unwrap().len(), 5);
|
||||
}
|
||||
|
||||
// TODO: partial test since we are testing error, amd error is not yet fully implemented in
|
||||
|
|
|
@ -13,11 +13,12 @@ async fn create_and_get_index() {
|
|||
|
||||
assert_eq!(code, 200);
|
||||
assert_eq!(response["uid"], "test");
|
||||
assert_eq!(response["name"], "test");
|
||||
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(), 4);
|
||||
assert_eq!(response.as_object().unwrap().len(), 5);
|
||||
}
|
||||
|
||||
// TODO: partial test since we are testing error, amd error is not yet fully implemented in
|
||||
|
|
|
@ -13,6 +13,7 @@ async fn update_primary_key() {
|
|||
|
||||
assert_eq!(code, 200);
|
||||
assert_eq!(response["uid"], "test");
|
||||
assert_eq!(response["name"], "test");
|
||||
assert!(response.get("createdAt").is_some());
|
||||
assert!(response.get("updatedAt").is_some());
|
||||
|
||||
|
@ -21,7 +22,7 @@ async fn update_primary_key() {
|
|||
assert!(created_at < updated_at);
|
||||
|
||||
assert_eq!(response["primaryKey"], "primary");
|
||||
assert_eq!(response.as_object().unwrap().len(), 4);
|
||||
assert_eq!(response.as_object().unwrap().len(), 5);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue