Skip to content

Commit

Permalink
add test coverage for IndexMut<&TicketId>
Browse files Browse the repository at this point in the history
  • Loading branch information
abd0-omar authored Sep 7, 2024
1 parent 97d13e5 commit ae08879
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions exercises/06_ticket_management/14_index_mut/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit ae08879

Please sign in to comment.