From 1825acdbb3b05fef90427eb9f24ab8c8b3fda234 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sat, 14 Aug 2021 12:29:39 -0400 Subject: [PATCH] add test for account recovery confirmation --- steamguard/src/lib.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/steamguard/src/lib.rs b/steamguard/src/lib.rs index dcd38e1..9e5b0e9 100644 --- a/steamguard/src/lib.rs +++ b/steamguard/src/lib.rs @@ -394,4 +394,21 @@ mod tests { } ); } + + #[test] + fn test_parse_phone_number_change() { + let text = include_str!("fixtures/confirmations/phone-number-change.html"); + let confirmations = parse_confirmations(text.into()).unwrap(); + assert_eq!(confirmations.len(), 1); + assert_eq!( + confirmations[0], + Confirmation { + id: 9931444017, + key: 9746021299562127894, + conf_type: ConfirmationType::AccountRecovery, + creator: 2861625242839108895, + description: "Account recovery Just now".into(), + } + ); + } }