added test with valid registered recepient that has white spaces

This commit is contained in:
Alfred Kamanda 2025-05-06 16:12:02 +03:00
parent 27d9938da6
commit bcfec85b6c
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -1761,7 +1761,6 @@ func TestValidateRecipient(t *testing.T) {
expectedRecipient: []byte("0xd4c288865Ce0985a481Eef3be02443dF5E2e4Ea9"), expectedRecipient: []byte("0xd4c288865Ce0985a481Eef3be02443dF5E2e4Ea9"),
expectedResult: resource.Result{}, expectedResult: resource.Result{},
}, },
{ {
name: "Test for checksummed address", name: "Test for checksummed address",
input: []byte("0x5523058cdffe5f3c1eadadd5015e55c6e00fb439"), input: []byte("0x5523058cdffe5f3c1eadadd5015e55c6e00fb439"),
@ -1769,6 +1768,13 @@ func TestValidateRecipient(t *testing.T) {
expectedRecipient: []byte("0x5523058cdFfe5F3c1EaDADD5015E55C6E00fb439"), expectedRecipient: []byte("0x5523058cdFfe5F3c1EaDADD5015E55C6E00fb439"),
expectedResult: resource.Result{}, expectedResult: resource.Result{},
}, },
{
name: "Test with valid registered recepient that has white spaces",
input: []byte("0711 22 33 44"),
expectError: false,
expectedRecipient: []byte(publicKey),
expectedResult: resource.Result{},
},
} }
// store a public key for the valid recipient // store a public key for the valid recipient