From 56b01ba440dd5f1a689169edd55697bcb702b9c6 Mon Sep 17 00:00:00 2001 From: mpostma Date: Fri, 5 Jun 2020 11:40:18 +0200 Subject: [PATCH] test error delete unexisting index --- meilisearch-http/tests/index.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meilisearch-http/tests/index.rs b/meilisearch-http/tests/index.rs index be8193613..babe0e7aa 100644 --- a/meilisearch-http/tests/index.rs +++ b/meilisearch-http/tests/index.rs @@ -195,6 +195,12 @@ async fn rename_index() { async fn delete_index_and_recreate_it() { let mut server = common::Server::with_uid("movies"); + // 0 - delete unexisting index is error + + let (response, status_code) = server.delete_request("/indexes/test").await; + assert_eq!(status_code, 404); + assert_eq!(&response["errorCode"], "index_not_found"); + // 1 - Create a new index let body = json!({