update the reset flags in TestCheckBlockedStatus

This commit is contained in:
Alfred Kamanda 2025-04-09 18:06:24 +03:00
parent 4ef8c47f8b
commit b89abf3487
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -2355,10 +2355,8 @@ func TestCheckBlockedStatus(t *testing.T) {
if err != nil { if err != nil {
t.Logf(err.Error()) t.Logf(err.Error())
} }
flag_account_blocked, err := fm.GetFlag("flag_account_blocked") flag_account_blocked, _ := fm.GetFlag("flag_account_blocked")
if err != nil { flag_account_pin_reset, _ := fm.GetFlag("flag_account_pin_reset")
t.Logf(err.Error())
}
h := &MenuHandlers{ h := &MenuHandlers{
userdataStore: store, userdataStore: store,
@ -2373,13 +2371,15 @@ func TestCheckBlockedStatus(t *testing.T) {
{ {
name: "Currently blocked account", name: "Currently blocked account",
currentWrongPinAttempts: "4", currentWrongPinAttempts: "4",
expectedResult: resource.Result{}, expectedResult: resource.Result{
FlagReset: []uint32{flag_account_pin_reset},
},
}, },
{ {
name: "Account with 0 wrong PIN attempts", name: "Account with 0 wrong PIN attempts",
currentWrongPinAttempts: "0", currentWrongPinAttempts: "0",
expectedResult: resource.Result{ expectedResult: resource.Result{
FlagReset: []uint32{flag_account_blocked}, FlagReset: []uint32{flag_account_pin_reset, flag_account_blocked},
}, },
}, },
} }