test: add delegate mismatch test case
This commit is contained in:
parent
ad2fa3ceaf
commit
d40712999c
|
@ -448,9 +448,10 @@ test('invalid approve', async () => {
|
|||
const owner = await newAccountWithTokens(connection);
|
||||
|
||||
const account1 = await testToken.newAccount(owner);
|
||||
const account1Delegate = await testToken.newAccount(owner, account1);
|
||||
const account2 = await testToken.newAccount(owner);
|
||||
|
||||
// account2 is not a delegate account
|
||||
// account2 is not a delegate account of account1
|
||||
expect(
|
||||
testToken.approve(
|
||||
owner,
|
||||
|
@ -459,6 +460,16 @@ test('invalid approve', async () => {
|
|||
123
|
||||
)
|
||||
).rejects.toThrow();
|
||||
|
||||
// account1Delegate is not a delegate account of account2
|
||||
expect(
|
||||
testToken.approve(
|
||||
owner,
|
||||
account2,
|
||||
account1Delegate,
|
||||
123
|
||||
)
|
||||
).rejects.toThrow();
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue