From ae088792275b843b560c5788f3e60086e1b55c9b Mon Sep 17 00:00:00 2001 From: Abdelrahman Omar <128975938+abd0-omar@users.noreply.github.com> Date: Sat, 7 Sep 2024 19:34:41 +0300 Subject: [PATCH] add test coverage for IndexMut<&TicketId> --- exercises/06_ticket_management/14_index_mut/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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 a877f9d31..fa3945160 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); } }