-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase coverage #149
Increase coverage #149
Conversation
Before it would just remove it.
Comment out redundant conditions in else clauses.
This reverts commit ef045fc. Will push this in a separate PR, as we froze contracts for the audit.
As contracts are frozen for the audit.
As contracts are frozen for the audit.
|
||
await web3.eth.sendTransaction({ to: defaultPool.address, from: owner, value: amount }) | ||
|
||
await th.assertRevert(defaultPool.sendETH(nonPayable.address, amount, { from: owner }), 'DefaultPool: sending ETH failed') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm does this revert because defaultPool.sendETH
is only callable TroveManager
though? If so, it wouldn't hit the final _require(success, ...)
that we want to test here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, but no, because owner
is the TroveManager
here 😉 :
https://github.com/liquity/dev/pull/149/files#diff-ff756b67b4b4fded33dc971414822ef458d9dc958a1ee0bb38f11c99d6fc4daaR17
Anyway, this highlights again the importance of revert messages. While testing these PRs I restore the message check in testHelpers, but I may forget it sometimes. Hopefully we can have issue #99 fixed soon! 🤞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I see. Nice.
Definitely, thanks!
For issue #74