refactor testing error throwing
This commit is contained in:
@ -55,19 +55,19 @@ contract('PausableToken', function(accounts) {
|
||||
await token.pause();
|
||||
try {
|
||||
await token.transfer(accounts[1], 100);
|
||||
assert.fail('should have thrown before');
|
||||
} catch (error) {
|
||||
return assertJump(error);
|
||||
assertJump(error);
|
||||
}
|
||||
assert.fail('should have thrown before');
|
||||
});
|
||||
|
||||
it('should throw an error trying to transfer from another account while transactions are paused', async function() {
|
||||
await token.pause();
|
||||
try {
|
||||
await token.transferFrom(accounts[0], accounts[1], 100);
|
||||
assert.fail('should have thrown before');
|
||||
} catch (error) {
|
||||
return assertJump(error);
|
||||
assertJump(error);
|
||||
}
|
||||
assert.fail('should have thrown before');
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user