forked from urdt/ussd
updated tests
This commit is contained in:
parent
5cd791aae7
commit
7aea2af9a1
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user