mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-11-16 19:50:44 +01:00
add test coverage for IndexMut<&TicketId> (#142)
This commit is contained in:
parent
ea71ac2c0a
commit
e768d9dbd8
1 changed files with 6 additions and 0 deletions
|
@ -99,5 +99,11 @@ mod tests {
|
||||||
|
|
||||||
let ticket = &store[id];
|
let ticket = &store[id];
|
||||||
assert_eq!(ticket.status, Status::InProgress);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue