Bug fixes and menu improvement #19

Merged
lash merged 6 commits from minor-bug-fixes into master 2025-02-04 14:36:20 +01:00
Showing only changes of commit f7873bfef7 - Show all commits

View File

@ -1857,12 +1857,14 @@ func TestVerifyNewPin(t *testing.T) {
sessionId := "session123" sessionId := "session123"
fm, _ := NewFlagManager(flagsPath) fm, _ := NewFlagManager(flagsPath)
mockState := state.NewState(16)
flag_valid_pin, _ := fm.GetFlag("flag_valid_pin") flag_valid_pin, _ := fm.GetFlag("flag_valid_pin")
mockAccountService := new(mocks.MockAccountService) mockAccountService := new(mocks.MockAccountService)
h := &MenuHandlers{ h := &MenuHandlers{
flagManager: fm, flagManager: fm,
accountService: mockAccountService, accountService: mockAccountService,
st: mockState,
} }
ctx := context.WithValue(context.Background(), "SessionId", sessionId) ctx := context.WithValue(context.Background(), "SessionId", sessionId)
@ -1900,6 +1902,7 @@ func TestVerifyNewPin(t *testing.T) {
func TestConfirmPin(t *testing.T) { func TestConfirmPin(t *testing.T) {
sessionId := "session123" sessionId := "session123"
mockState := state.NewState(16)
ctx, store := InitializeTestStore(t) ctx, store := InitializeTestStore(t)
ctx = context.WithValue(ctx, "SessionId", sessionId) ctx = context.WithValue(ctx, "SessionId", sessionId)
@ -1910,6 +1913,7 @@ func TestConfirmPin(t *testing.T) {
userdataStore: store, userdataStore: store,
flagManager: fm, flagManager: fm,
accountService: mockAccountService, accountService: mockAccountService,
st: mockState,
} }
tests := []struct { tests := []struct {