Skip to content

Commit

Permalink
add token allowance test
Browse files Browse the repository at this point in the history
  • Loading branch information
barrasso committed Oct 27, 2021
1 parent 20ba45e commit a7ae679
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/contracts/Wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ contract('Wrapper', async accounts => {
assert.equal(await instance.resolver(), addressResolver.address);
});

it('should set the wrapper token approval', async () => {
const allowance = await weth.allowance(instance.address, instance.address);
assert.bnEqual(
allowance,
web3.utils.toBN(
'115792089237316195423570985008687907853269984665640564039457584007913129639935'
) // uint256(-1)
);
});

it('should access its dependencies via the address resolver', async () => {
assert.equal(await addressResolver.getAddress(toBytes32('SynthsETH')), sETHSynth.address);
assert.equal(await addressResolver.getAddress(toBytes32('SynthsUSD')), sUSDSynth.address);
Expand Down

0 comments on commit a7ae679

Please sign in to comment.