Skip to content

Commit

Permalink
Make test compliant with new country_id method
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Jul 7, 2024
1 parent 161859e commit db2b29f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/phone_number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ mod test {
#[case] country: Option<country::Id>,
#[case] _type: Type,
) -> anyhow::Result<()> {
assert_eq!(country, number.country().id());
// Flatten the error into an Option.
// XXX: We can't currently distinguish an error case from an unavailable case, given the
// current phone number list in rstest above.
assert_eq!(country, number.country().id().ok().flatten());

Ok(())
}
Expand Down

0 comments on commit db2b29f

Please sign in to comment.