From: Abdelrahman Omar <128975938+abd0-omar@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:37:23 +0000 (+0300) Subject: add test coverage for IndexMut<&TicketId> (#142) X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=e768d9dbd898e3dc11991a4553046ee61c22fe99;p=rust_exercises.git add test coverage for IndexMut<&TicketId> (#142) --- diff --git a/exercises/06_ticket_management/14_index_mut/src/lib.rs b/exercises/06_ticket_management/14_index_mut/src/lib.rs index a877f9d..fa39451 100644 --- a/exercises/06_ticket_management/14_index_mut/src/lib.rs +++ b/exercises/06_ticket_management/14_index_mut/src/lib.rs @@ -99,5 +99,11 @@ mod tests { let ticket = &store[id]; assert_eq!(ticket.status, Status::InProgress); + + let ticket = &mut store[&id]; + ticket.status = Status::Done; + + let ticket = &store[id]; + assert_eq!(ticket.status, Status::Done); } }