Add tests to check transfers to 0x0 fail

This commit is contained in:
Pavel Rubin
2017-08-29 00:10:40 +03:00
committed by Francisco Giordano
parent 209e2de93b
commit d095ba84bf
2 changed files with 20 additions and 0 deletions

View File

@ -88,4 +88,14 @@ contract('StandardToken', function(accounts) {
})
});
it("should throw an error when trying to transfer to 0x0", async function() {
let token = await StandardTokenMock.new(accounts[0], 100);
try {
let transfer = await token.transfer(0x0, 100);
assert.fail('should have thrown before');
} catch(error) {
assertJump(error);
}
});
});