Skip to content

Commit

Permalink
add test coverage for IndexMut<&TicketId> (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
abd0-omar authored Sep 11, 2024
1 parent ea71ac2 commit e768d9d
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 e768d9d

Please sign in to comment.