Fix: `recv` returns an `Option<Ticket>`

This commit is contained in:
LukeMathWalker 2024-05-13 20:30:01 +02:00
parent d23f48a3a9
commit a0f3a6eaa7
1 changed files with 4 additions and 1 deletions

View File

@ -34,7 +34,10 @@ fn insert_works() {
.send(command) .send(command)
.expect("Did you actually spawn a thread? The channel is closed!"); .expect("Did you actually spawn a thread? The channel is closed!");
let ticket: Ticket = response_receiver.recv().expect("No response received!"); let ticket: Ticket = response_receiver
.recv()
.expect("No response received!")
.unwrap();
assert_eq!(ticket_id, ticket.id); assert_eq!(ticket_id, ticket.id);
assert_eq!(ticket.status, Status::ToDo); assert_eq!(ticket.status, Status::ToDo);
assert_eq!(ticket.title, draft.title); assert_eq!(ticket.title, draft.title);