refactor testing error throwing

This commit is contained in:
Jakub Wojciechowski
2017-07-22 21:40:01 +01:00
parent 5e7847537a
commit b3f60b9320
10 changed files with 79 additions and 78 deletions

View File

@ -27,11 +27,11 @@ contract('LimitBalance', function(accounts) {
it('shouldnt allow sending above limit', async function() {
let amount = 1110;
try {
await lb.limitedDeposit({value: amount});
await lb.limitedDeposit({value: amount});
assert.fail('should have thrown before');
} catch(error) {
return assertJump(error);
}
assert.fail('should have thrown before');
assertJump(error);
}
});
it('should allow multiple sends below limit', async function() {
@ -52,10 +52,10 @@ contract('LimitBalance', function(accounts) {
try {
await lb.limitedDeposit({value: amount+1});
assert.fail('should have thrown before');
} catch(error) {
return assertJump(error);
}
assert.fail('should have thrown before');
assertJump(error);
}
});
});