fix tests

This commit is contained in:
mpostma
2020-12-15 12:05:17 +01:00
parent 2904ca7f57
commit 6eb7843858
5 changed files with 28 additions and 69 deletions

View File

@ -779,30 +779,32 @@ async fn update_existing_primary_key_is_error() {
}
#[actix_rt::test]
async fn test_facets_distribution_attribute() {
async fn test_field_distribution_attribute() {
let mut server = common::Server::test_server().await;
let (response, _status_code) = server.get_index_stats().await;
let expected = json!({
"isIndexing": false,
"numberOfDocuments":77,
"fieldsDistribution":{
"age":77,
"gender":77,
"phone":77,
"name":77,
"registered":77,
"latitude":77,
"email":77,
"tags":77,
"longitude":77,
"color":77,
"address":77,
"balance":77,
"about":77,
"picture":77,
"fieldsDistribution": {
"about": 77,
"address": 77,
"age": 77,
"balance": 77,
"color": 77,
"email": 77,
"gender": 77,
"id": 77,
"isActive": 77,
"latitude": 77,
"longitude": 77,
"name": 77,
"phone": 77,
"picture": 77,
"registered": 77,
"tags": 77
},
"isIndexing": false,
"numberOfDocuments": 77
});
assert_json_eq!(expected, response, ordered: true);