This is the part that is not getting triggered in the test.
// try transferring more then senders balance
return tokenInstance.transferFrom(fromAccount, toAccount, 9999, {from: spendingAccount});
}).then(assert.fail).catch(function(error){
assert(error.message.indexOf('revert') >= 0, 'cannot transfer value larger than balance');
When I run the test I get no error.
I am using solidity 0.5.0 and I am following the update from the pull request. It should give me an error.
Truffle v5.0.2 (core: 5.0.2)
Solidity v0.5.0 (solc-js)
Node v12.16.3
This is the part that is not getting triggered in the test.
When I run the test I get no error.
I am using solidity 0.5.0 and I am following the update from the pull request. It should give me an error. Truffle v5.0.2 (core: 5.0.2) Solidity v0.5.0 (solc-js) Node v12.16.3
You can see all my code here; https://github.com/Madeindreams/AGC
I have updated truffle;
Truffle v5.1.43 (core: 5.1.43) Solidity v0.5.16 (solc-js) Node v12.16.3 Web3.js v1.2.1
By running the test with the --debug flag I can see the transactions
This shouldn't work since I dont have that much token?
Also, Visual studio is giving me a warning for the transferFrom function;
Function state mutability can be restricted to pure.
Even if I add pure or view. It still doesn't throw an error.