mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-06-07 04:35:37 +00:00
Improve Integration tests in the file stats.rs
This commit is contained in:
parent
677e8b122c
commit
c2ceb8e41b
@ -3,8 +3,8 @@ use crate::json;
|
|||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn stats() {
|
async fn stats() {
|
||||||
let server = Server::new().await;
|
let server = Server::new_shared().await;
|
||||||
let index = server.index("test");
|
let index = server.unique_index();
|
||||||
let (task, code) = index.create(Some("id")).await;
|
let (task, code) = index.create(Some("id")).await;
|
||||||
|
|
||||||
assert_eq!(code, 202);
|
assert_eq!(code, 202);
|
||||||
@ -47,8 +47,8 @@ async fn stats() {
|
|||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn error_get_stats_unexisting_index() {
|
async fn error_get_stats_unexisting_index() {
|
||||||
let server = Server::new().await;
|
let server = Server::new_shared().await;
|
||||||
let (response, code) = server.index("test").stats().await;
|
let (response, code) = server.unique_index().stats().await;
|
||||||
|
|
||||||
let expected_response = json!({
|
let expected_response = json!({
|
||||||
"message": "Index `test` not found.",
|
"message": "Index `test` not found.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user