1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00
This commit is contained in:
alexcos20 2020-10-15 23:04:04 -07:00
parent d3f6cfd05c
commit b34166732f

View File

@ -173,6 +173,13 @@ describe('Balancer flow', () => {
const totalSupply = await Pool.getPoolSharesTotalSupply(alicePoolAddress)
assert(Number(totalSupply) > 0)
})
it('Should fail to get amount of Ocean needed to buy more dtTokens than reserve', async () => {
const requiredOcean = await Pool.getOceanNeeded(
alicePoolAddress,
await Pool.getDTReserve(alicePoolAddress)
)
assert(requiredOcean === null)
})
it('Get amount of Ocean needed to buy 1 dtToken', async () => {
const requiredOcean = await Pool.getOceanNeeded(alicePoolAddress, '1')
assert(Number(requiredOcean) > 0)