handle demo not found in get

This commit is contained in:
Robin Appelman 2020-12-09 23:07:46 +01:00
commit 65c0f8ebb4
2 changed files with 20 additions and 2 deletions

View file

@ -200,3 +200,13 @@ async fn test_set_url_invalid_key() {
.await;
assert!(matches!(res.unwrap_err(), Error::InvalidApiKey));
}
#[tokio::test]
async fn test_get_demo_not_found() {
let client = test_client().await;
assert!(matches!(
dbg!(client.get(999).await.unwrap_err()),
Error::DemoNotFound(999)
));
}