mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
Add a test to check index soft deletion works correctly
This commit is contained in:
parent
f3fc0bed45
commit
95eb6ad09a
@ -765,4 +765,18 @@ mod tests {
|
||||
});
|
||||
assert_eq!(document, Some(new_doc2));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn delete_index() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
|
||||
let database = Database::open_or_create(dir.path()).unwrap();
|
||||
let _index = database.create_index("test").unwrap();
|
||||
|
||||
let deleted = database.delete_index("test").unwrap();
|
||||
assert!(deleted);
|
||||
|
||||
let result = database.open_index("test");
|
||||
assert!(result.is_none());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user