fix: handle playlist not found

This commit is contained in:
ThetaDev 2022-10-11 19:50:43 +02:00
parent de9e3c6ed9
commit 79b7fcf92c
5 changed files with 49 additions and 23 deletions

View file

@ -211,6 +211,21 @@ async fn playlist_cont2() {
assert!(playlist.videos.count.unwrap() > 100);
}
#[tokio::test]
async fn playlist_not_found() {
let rp = RustyPipe::builder().strict().build();
let err = rp
.query()
.playlist("PLbZIPy20-1pN7mqjckepWF78ndb6ci_qz")
.await
.unwrap_err();
assert!(matches!(
err,
Error::Extraction(ExtractionError::ContentUnavailable(_))
));
}
//#VIDEO DETAILS
#[tokio::test]