mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 21:20:24 +01:00
Add simple delete test
This commit is contained in:
parent
73c06d31d9
commit
3c15881818
@ -2332,6 +2332,32 @@ pub(crate) mod tests {
|
|||||||
"###);
|
"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn simple_delete() {
|
||||||
|
let mut index = TempIndex::new();
|
||||||
|
index.index_documents_config.update_method = IndexDocumentsMethod::UpdateDocuments;
|
||||||
|
index
|
||||||
|
.add_documents(documents!([
|
||||||
|
{ "id": 30 },
|
||||||
|
{ "id": 34 }
|
||||||
|
]))
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
db_snap!(index, documents_ids, @"[0, 1, ]");
|
||||||
|
db_snap!(index, external_documents_ids, 1, @r###"
|
||||||
|
docids:
|
||||||
|
30 0
|
||||||
|
34 1"###);
|
||||||
|
|
||||||
|
index.delete_document("34");
|
||||||
|
|
||||||
|
db_snap!(index, documents_ids, @"[0, ]");
|
||||||
|
db_snap!(index, external_documents_ids, 2, @r###"
|
||||||
|
docids:
|
||||||
|
30 0
|
||||||
|
"###);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn bug_3021_second() {
|
fn bug_3021_second() {
|
||||||
// https://github.com/meilisearch/meilisearch/issues/3021
|
// https://github.com/meilisearch/meilisearch/issues/3021
|
||||||
|
Loading…
x
Reference in New Issue
Block a user