Check the implementation of Display in the tests.
This commit is contained in:
parent
d9a0c025e9
commit
ae7769d879
|
@ -95,5 +95,11 @@ mod tests {
|
||||||
assert_eq!(ticket.description, "Description not provided");
|
assert_eq!(ticket.description, "Description not provided");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn display_is_correctly_implemented() {
|
||||||
|
let ticket = Ticket::new("".into(), valid_description(), Status::ToDo);
|
||||||
|
assert_eq!(format!("{}", ticket.unwrap_err()), "Title cannot be empty");
|
||||||
|
}
|
||||||
|
|
||||||
assert_impl_one!(TicketNewError: std::error::Error);
|
assert_impl_one!(TicketNewError: std::error::Error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue