mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
test delete settings
This commit is contained in:
parent
7d9c5f64aa
commit
3f939f3ccf
@ -141,6 +141,11 @@ impl Index<'_> {
|
||||
let url = format!("/indexes/{}/settings", self.uid);
|
||||
self.service.post(url, settings).await
|
||||
}
|
||||
|
||||
pub async fn delete_settings(&self) -> (Value, StatusCode) {
|
||||
let url = format!("/indexes/{}/settings", self.uid);
|
||||
self.service.delete(url).await
|
||||
}
|
||||
}
|
||||
|
||||
pub struct GetDocumentOptions;
|
||||
|
@ -50,6 +50,16 @@ async fn test_partial_update() {
|
||||
assert_eq!(response["searchableAttributes"],json!(["bar"]));
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
#[ignore]
|
||||
// need fix #54
|
||||
async fn delete_settings_unexisting_index() {
|
||||
let server = Server::new().await;
|
||||
let index = server.index("test");
|
||||
let (_response, code) = index.delete_settings().await;
|
||||
assert_eq!(code, 400);
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn update_setting_unexisting_index() {
|
||||
let server = Server::new().await;
|
||||
|
Loading…
Reference in New Issue
Block a user