Open Paradox-AT opened 6 years ago
Hm, if that's wrong, we certainly need to fix that in the docs! Thanks for bringing this to our attention. We'll figure out if the docs are still saying the wrong thing and make sure we correct the record.
The documentation might need to clarify what's going on. (selfdestruct to bypass fallback function)
Remove the last line i.e.
"Note that Truffle sends Ether to your test contract in a way that does not execute a fallback function, so you can still use the fallback function within your Solidity tests for advanced test cases."
from https://github.com/trufflesuite/trufflesuite.com/blob/main/src/docs/truffle/testing/writing-tests-in-solidity.md?plain=1#L197
The fallback function is being called when ethers are sent to the contract.
Edit: update source link