added a find function to model
This commit is contained in:
parent
125289ace1
commit
3e1e46ce2b
5 changed files with 16 additions and 11 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue