updated tests

This commit is contained in:
Alfred Kamanda 2024-12-13 11:44:04 +03:00
parent 5cd791aae7
commit 7aea2af9a1
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -1961,7 +1961,7 @@ func TestCheckVouchers(t *testing.T) {
{ContractAddress: "0x41c188d63Qa", TokenSymbol: "MILO", TokenDecimals: "4", Balance: "200"}, {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) mockAccountService.On("FetchVouchers", string(publicKey)).Return(mockVouchersResponse, nil)
@ -1982,7 +1982,11 @@ func TestCheckVouchers(t *testing.T) {
func TestGetVoucherList(t *testing.T) { func TestGetVoucherList(t *testing.T) {
sessionId := "session123" sessionId := "session123"
menuSeparator := ":"
ctx := context.WithValue(context.Background(), "SessionId", sessionId) ctx := context.WithValue(context.Background(), "SessionId", sessionId)
ctx = context.WithValue(ctx, "MenuSeparator", menuSeparator)
spdb := InitializeTestSubPrefixDb(t, ctx) spdb := InitializeTestSubPrefixDb(t, ctx)
@ -2024,7 +2028,7 @@ func TestViewVoucher(t *testing.T) {
// Define mock voucher data // Define mock voucher data
mockData := map[common.DataTyp][]byte{ 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_BALANCES: []byte("1:100\n2:200"),
common.DATA_VOUCHER_DECIMALS: []byte("1:6\n2:4"), common.DATA_VOUCHER_DECIMALS: []byte("1:6\n2:4"),
common.DATA_VOUCHER_ADDRESSES: []byte("1:0xd4c288865Ce\n2:0x41c188d63Qa"), common.DATA_VOUCHER_ADDRESSES: []byte("1:0xd4c288865Ce\n2:0x41c188d63Qa"),