get all documents, no options

This commit is contained in:
mpostma 2021-02-19 19:55:00 +01:00
parent 27a7238d3f
commit b8b8cc1312
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
2 changed files with 45 additions and 1 deletions

View file

@ -34,3 +34,15 @@ async fn get_no_documents() {
assert_eq!(code, 200);
assert!(response.as_array().unwrap().is_empty());
}
#[actix_rt::test]
async fn get_all_documents_no_options() {
let server = Server::new().await;
let index = server.index("test");
index.load_test_set().await;
let (response, code) = index.get_all_documents(GetAllDocumentsOptions::default()).await;
assert_eq!(code, 200);
let arr = response.as_array().unwrap();
assert_eq!(arr.len(), 20);
}