Removed warnings from delete tests.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2026-05-03 10:44:33 -04:00
parent dfece70270
commit a723039082

View File

@@ -10,7 +10,7 @@ use support::{setup_range, TestDocument};
#[test]
fn can_delete() {
let data = "fred";
let mut mtt = MoreThanText::new();
let mtt = MoreThanText::new();
let client = mtt.client();
let test_doc = TestDocument::new(vec![FieldType::StaticString]);
client.create_document(test_doc.get_docdef()).unwrap();
@@ -29,7 +29,7 @@ fn can_delete() {
fn can_delete_specific() {
let selected = 1;
let (test_env, test_doc) = setup_range(3);
let mut mtt = test_env.get_morethantext();
let mtt = test_env.get_morethantext();
let client = mtt.client();
let mut calc = Calculation::new(Operand::Equal);
calc.add_value(selected.clone()).unwrap();
@@ -69,7 +69,7 @@ fn can_delete_multiple() {
let selected: i128 = 2; // must be less than count and not less than 0
let bound = selected + 1;
let (test_env, test_doc) = setup_range(count.clone().try_into().unwrap());
let mut mtt = test_env.get_morethantext();
let mtt = test_env.get_morethantext();
let client = mtt.client();
let mut calc = Calculation::new(Operand::GreaterThan);
calc.add_value(CalcValue::Existing(FieldType::Integer))
@@ -112,7 +112,7 @@ fn can_delete_multiple() {
#[test]
fn does_delete_error_on_a_bad_query() {
let (test_env, test_doc) = setup_range(1);
let mut mtt = test_env.get_morethantext();
let mtt = test_env.get_morethantext();
let client = mtt.client();
let bad_name = Name::japanese("正しくない");
let mut delete = Delete::new(test_doc.get_doc_name());
@@ -132,11 +132,13 @@ fn does_delete_error_on_a_bad_query() {
#[test]
fn does_delete_update_indexes() {
let id = "something";
let mut mtt = MoreThanText::new();
let mtt = MoreThanText::new();
let client = mtt.client();
let test_doc = TestDocument::new(vec![FieldType::StaticString]);
let mut docdef = test_doc.get_docdef();
docdef.add_index(&test_doc.get_field_name(0), IndexType::Unique);
docdef
.add_index(&test_doc.get_field_name(0), IndexType::Unique)
.unwrap();
client.create_document(docdef).unwrap();
test_doc.populate(mtt.clone(), vec![id]);
client
@@ -154,7 +156,7 @@ fn does_delete_update_indexes() {
fn does_delete_send_trigger() {
let selected = 2;
let (mut test_env, test_doc) = setup_range(3);
let mut mtt = test_env.get_morethantext();
let mtt = test_env.get_morethantext();
let client = mtt.client();
test_env.register_channel(vec![Path::new(
Include::All,