fix: moved integration tests,

fixed missing search video count,
error on missing search channel description snipped,
error on empty channel info link list,
This commit is contained in:
ThetaDev 2022-10-11 00:31:04 +02:00
parent 4dfdb47cae
commit 1fb4a2664e
13 changed files with 998 additions and 864 deletions

View file

@ -257,6 +257,10 @@ fn map_search_items(
subscriber_count: channel
.subscriber_count_text
.and_then(|txt| util::parse_numeric_or_warn(&txt, &mut warnings)),
video_count: channel
.video_count_text
.and_then(|txt| util::parse_numeric(&txt).ok())
.unwrap_or_default(),
short_description: channel.description_snippet,
}))
}
@ -281,7 +285,7 @@ mod tests {
use std::{fs::File, io::BufReader, path::Path};
use crate::{
client::{response, MapResponse, RustyPipe},
client::{response, MapResponse},
model::{Paginator, SearchItem, SearchResult},
param::Language,
serializer::MapResult,
@ -289,17 +293,6 @@ mod tests {
use rstest::rstest;
#[tokio::test]
async fn t1() {
let rp = RustyPipe::builder().strict().build();
let result = rp
.query()
.search("grewhbtrjlrbnerwhlbvuwrkeghurzueg")
.await
.unwrap();
dbg!(&result);
}
#[rstest]
#[case::default("default")]
#[case::playlists("playlists")]