mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 18:45:06 +08:00
25 lines
687 B
Rust
25 lines
687 B
Rust
|
use crate::common::Server;
|
||
|
use crate::common::GetAllDocumentsOptions;
|
||
|
|
||
|
// TODO: partial test since we are testing error, amd error is not yet fully implemented in
|
||
|
// transplant
|
||
|
#[actix_rt::test]
|
||
|
async fn get_unexisting_index_single_document() {
|
||
|
let server = Server::new().await;
|
||
|
let (_response, code) = server
|
||
|
.index("test")
|
||
|
.get_document(1, None)
|
||
|
.await;
|
||
|
assert_eq!(code, 400);
|
||
|
}
|
||
|
|
||
|
#[actix_rt::test]
|
||
|
async fn get_unexisting_index_all_documents() {
|
||
|
let server = Server::new().await;
|
||
|
let (_response, code) = server
|
||
|
.index("test")
|
||
|
.get_all_documents(GetAllDocumentsOptions::default())
|
||
|
.await;
|
||
|
assert_eq!(code, 400);
|
||
|
}
|