From 7aea2af9a1baca5ca5b9ef3ac38ef74f6b1b08d3 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Fri, 13 Dec 2024 11:44:04 +0300 Subject: [PATCH] updated tests --- internal/handlers/ussd/menuhandler_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/handlers/ussd/menuhandler_test.go b/internal/handlers/ussd/menuhandler_test.go index 5cc3067..01beb89 100644 --- a/internal/handlers/ussd/menuhandler_test.go +++ b/internal/handlers/ussd/menuhandler_test.go @@ -1961,7 +1961,7 @@ func TestCheckVouchers(t *testing.T) { {ContractAddress: "0x41c188d63Qa", TokenSymbol: "MILO", TokenDecimals: "4", Balance: "200"}, } - expectedSym := []byte("1: SRF\n2: MILO") + expectedSym := []byte("1:SRF\n2:MILO") mockAccountService.On("FetchVouchers", string(publicKey)).Return(mockVouchersResponse, nil) @@ -1982,7 +1982,11 @@ func TestCheckVouchers(t *testing.T) { func TestGetVoucherList(t *testing.T) { sessionId := "session123" + menuSeparator := ":" + ctx := context.WithValue(context.Background(), "SessionId", sessionId) + ctx = context.WithValue(ctx, "MenuSeparator", menuSeparator) + spdb := InitializeTestSubPrefixDb(t, ctx) @@ -2024,7 +2028,7 @@ func TestViewVoucher(t *testing.T) { // Define mock voucher data mockData := map[common.DataTyp][]byte{ - common.DATA_VOUCHER_SYMBOLS: []byte("1: SRF\n2: MILO"), + common.DATA_VOUCHER_SYMBOLS: []byte("1:SRF\n2:MILO"), common.DATA_VOUCHER_BALANCES: []byte("1:100\n2:200"), common.DATA_VOUCHER_DECIMALS: []byte("1:6\n2:4"), common.DATA_VOUCHER_ADDRESSES: []byte("1:0xd4c288865Ce\n2:0x41c188d63Qa"),