Moved support tests to client.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2026-03-25 10:35:37 -04:00
parent 20e7aa69ff
commit 28618ff019

View File

@@ -59,6 +59,7 @@ fn can_field_types_be_varied() {
fn can_record_be_added_to_document() {
let count = 5;
let mut mtt = MoreThanText::new();
let client = mtt.client();
let mut fields: Vec<FieldType> = Vec::new();
let mut input: Vec<String> = Vec::new();
for i in 0..count {
@@ -66,10 +67,10 @@ fn can_record_be_added_to_document() {
input.push(i.to_string());
}
let test_doc = TestDocument::new(fields);
mtt.create_document(test_doc.get_docdef());
client.create_document(test_doc.get_docdef());
test_doc.populate(mtt.clone(), input);
let query = Query::new(test_doc.get_doc_name());
let results = mtt.records(query).unwrap();
let results = client.records(query).unwrap();
assert_eq!(results.len(), 1);
for rec in results.iter() {
for i in 0..count {
@@ -83,8 +84,9 @@ fn can_record_be_added_to_document() {
fn can_document_be_populated_with_multiple_records() {
let count = 5;
let mut mtt = MoreThanText::new();
let client = mtt.client();
let test_doc = TestDocument::new(vec![FieldType::Integer]);
mtt.create_document(test_doc.get_docdef());
client.create_document(test_doc.get_docdef());
let mut data: Vec<Vec<i128>> = Vec::new();
for i in 0..count {
let item: i128 = i.try_into().unwrap();
@@ -93,6 +95,6 @@ fn can_document_be_populated_with_multiple_records() {
}
test_doc.populate_multiple(mtt.clone(), data);
let query = Query::new(test_doc.get_doc_name());
let results = mtt.records(query).unwrap();
let results = client.records(query).unwrap();
assert_eq!(results.len(), count);
}