updated the TestGetVoucherDetails

This commit is contained in:
Alfred Kamanda 2024-12-02 13:30:33 +03:00
parent c2019267d1
commit ef3a3d6717
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -2026,7 +2026,6 @@ func TestSetVoucher(t *testing.T) {
}
func TestGetVoucherDetails(t *testing.T) {
ctx, store := InitializeTestStore(t)
fm, err := NewFlagManager(flagsPath)
if err != nil {
@ -2056,12 +2055,11 @@ func TestGetVoucherDetails(t *testing.T) {
TokenCommodity: "Farming",
}
expectedResult.Content = fmt.Sprintf(
"name: %s\nsymbol: %s\ncommodity: %s\nlocation: %s", tokenDetails.TokenName, tokenDetails.TokenSymbol, tokenDetails.TokenCommodity, tokenDetails.TokenLocation,
"Name: %s\nSymbol: %s\nCommodity: %s\nLocation: %s", tokenDetails.TokenName, tokenDetails.TokenSymbol, tokenDetails.TokenCommodity, tokenDetails.TokenLocation,
)
mockAccountService.On("VoucherData", string(tokA_AAddress)).Return(tokenDetails, nil)
res, err := h.GetVoucherDetails(ctx, "SessionId", []byte(""))
assert.NoError(t, err)
assert.Equal(t, expectedResult, res)
}