test: fix asserts: client version parts, iOS client bitrate
This commit is contained in:
parent
45b9f2a627
commit
29a7db231a
5 changed files with 25 additions and 24 deletions
|
|
@ -1592,9 +1592,11 @@ fn validate_country(country: Country) -> Country {
|
|||
mod tests {
|
||||
use super::*;
|
||||
|
||||
// 1.20240506.01.00-canary_control_1.20240508.01.01
|
||||
// 1.20240508.01.01-canary_experiment_1.20240506.01.00
|
||||
fn get_major_version(version: &str) -> u32 {
|
||||
let parts = version.split('.').collect::<Vec<_>>();
|
||||
assert_eq!(parts.len(), 4);
|
||||
assert!(parts.len() >= 4, "version: {version}");
|
||||
parts[0].parse().unwrap()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -476,15 +476,12 @@ impl TryFrom<TextComponent> for crate::model::ChannelId {
|
|||
match value {
|
||||
TextComponent::Browse {
|
||||
text,
|
||||
page_type,
|
||||
page_type: PageType::Channel | PageType::Artist,
|
||||
browse_id,
|
||||
} => match page_type {
|
||||
PageType::Channel | PageType::Artist => Ok(crate::model::ChannelId {
|
||||
id: browse_id,
|
||||
name: text,
|
||||
}),
|
||||
_ => Err(()),
|
||||
},
|
||||
} => Ok(crate::model::ChannelId {
|
||||
id: browse_id,
|
||||
name: text,
|
||||
}),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue