ayrat555 / frankenstein

Telegram bot API client for Rust
Do What The F*ck You Want To Public License
268 stars 28 forks source link

test: improve testing for api error response #216

Closed EdJoPaTo closed 1 month ago

EdJoPaTo commented 1 month ago

Using the destructuring might mistakenly result in a wrong output. This could be misleading. For example an error code of 500 would result in the panic message while its still an API Error.

This moves the assertions to assert_eq and only destructures the Error::Api