added a find function to model

This commit is contained in:
Chris Cochrun 2024-10-09 15:47:53 -05:00
parent 125289ace1
commit 3e1e46ce2b
5 changed files with 16 additions and 11 deletions

View file

@ -88,7 +88,7 @@ mod test {
let mut presentation_model: Model<Presentation> =
Model::default();
presentation_model.load_from_db();
if let Some(presentation) = presentation_model.get_item(|p| p.id == 10) {
if let Some(presentation) = presentation_model.find(|p| p.id == 54) {
let test_presentation = test_presentation();
assert_eq!(&test_presentation, presentation);
} else {