From b34166732f4ddaacb4a7ba9ab9f13cb6e5961cfc Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Thu, 15 Oct 2020 23:04:04 -0700 Subject: [PATCH] add test --- test/unit/balancer/Balancer.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/unit/balancer/Balancer.test.ts b/test/unit/balancer/Balancer.test.ts index e164dc17..85aa330c 100644 --- a/test/unit/balancer/Balancer.test.ts +++ b/test/unit/balancer/Balancer.test.ts @@ -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)