Compare commits
No commits in common. "b89abf3487aa14d55bbd900b481726e41b60bbfd" and "1076a9578e96388ef89e78cbbf94f321155e1528" have entirely different histories.
b89abf3487
...
1076a9578e
@ -1889,7 +1889,7 @@ func TestVerifyNewPin(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfirmPinChange(t *testing.T) {
|
||||
func TestConfirmPin(t *testing.T) {
|
||||
sessionId := "session123"
|
||||
|
||||
mockState := state.NewState(16)
|
||||
@ -1898,8 +1898,6 @@ func TestConfirmPinChange(t *testing.T) {
|
||||
|
||||
fm, _ := NewFlagManager(flagsPath)
|
||||
flag_pin_mismatch, _ := fm.GetFlag("flag_pin_mismatch")
|
||||
flag_account_pin_reset, _ := fm.GetFlag("flag_account_pin_reset")
|
||||
|
||||
mockAccountService := new(mocks.MockAccountService)
|
||||
h := &MenuHandlers{
|
||||
userdataStore: store,
|
||||
@ -1919,7 +1917,7 @@ func TestConfirmPinChange(t *testing.T) {
|
||||
input: []byte("1234"),
|
||||
temporarypin: "1234",
|
||||
expectedResult: resource.Result{
|
||||
FlagReset: []uint32{flag_pin_mismatch, flag_account_pin_reset},
|
||||
FlagReset: []uint32{flag_pin_mismatch},
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -2355,8 +2353,10 @@ func TestCheckBlockedStatus(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Logf(err.Error())
|
||||
}
|
||||
flag_account_blocked, _ := fm.GetFlag("flag_account_blocked")
|
||||
flag_account_pin_reset, _ := fm.GetFlag("flag_account_pin_reset")
|
||||
flag_account_blocked, err := fm.GetFlag("flag_account_blocked")
|
||||
if err != nil {
|
||||
t.Logf(err.Error())
|
||||
}
|
||||
|
||||
h := &MenuHandlers{
|
||||
userdataStore: store,
|
||||
@ -2371,15 +2371,13 @@ func TestCheckBlockedStatus(t *testing.T) {
|
||||
{
|
||||
name: "Currently blocked account",
|
||||
currentWrongPinAttempts: "4",
|
||||
expectedResult: resource.Result{
|
||||
FlagReset: []uint32{flag_account_pin_reset},
|
||||
},
|
||||
expectedResult: resource.Result{},
|
||||
},
|
||||
{
|
||||
name: "Account with 0 wrong PIN attempts",
|
||||
currentWrongPinAttempts: "0",
|
||||
expectedResult: resource.Result{
|
||||
FlagReset: []uint32{flag_account_pin_reset, flag_account_blocked},
|
||||
FlagReset: []uint32{flag_account_blocked},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user