From fe47fe6d2af429e68b1ca6021bd820421262e0ec Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Thu, 26 Sep 2024 09:47:47 +0100 Subject: [PATCH] Fix test --- backend/integration_tests/src/pin_number_tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/integration_tests/src/pin_number_tests.rs b/backend/integration_tests/src/pin_number_tests.rs index c17df0690a..96eaaa9ca7 100644 --- a/backend/integration_tests/src/pin_number_tests.rs +++ b/backend/integration_tests/src/pin_number_tests.rs @@ -60,21 +60,21 @@ fn can_set_pin_number_by_providing_recent_delegation(within_5_minutes: bool) { }, ); + let initial_state2 = client::user::happy_path::initial_state(env, &user); + if within_5_minutes { assert!(matches!( set_pin_number_response, user_canister::set_pin_number::Response::Success )); + assert!(initial_state2.pin_number_settings.is_none()); } else { assert!(matches!( set_pin_number_response, user_canister::set_pin_number::Response::DelegationTooOld )); + assert!(initial_state2.pin_number_settings.is_some()); } - - let initial_state2 = client::user::happy_path::initial_state(env, &user); - - assert!(initial_state2.pin_number_settings.is_none()); } #[test]