fix coverage

This commit is contained in:
mingda
2020-06-26 13:09:07 +08:00
parent ccce3f9cd8
commit 8de5d8f1ab
6 changed files with 20 additions and 8 deletions

View File

@@ -386,7 +386,7 @@ describe("LiquidityProvider", () => {
await assert.rejects(
ctx.DODO.methods.getWithdrawBasePenalty(decimalStr("10")).call(),
/DODO_BASE_BALANCE_NOT_ENOUGH/
/DODO_BASE_TOKEN_BALANCE_NOT_ENOUGH/
)
})
@@ -401,7 +401,7 @@ describe("LiquidityProvider", () => {
await assert.rejects(
ctx.DODO.methods.getWithdrawQuotePenalty(decimalStr("1000")).call(),
/DODO_QUOTE_BALANCE_NOT_ENOUGH/
/DODO_QUOTE_TOKEN_BALANCE_NOT_ENOUGH/
)
})
@@ -441,6 +441,17 @@ describe("LiquidityProvider", () => {
/LP_QUOTE_CAPITAL_BALANCE_NOT_ENOUGH/
)
})
it("withdraw when there is no lp", async () => {
await assert.rejects(
ctx.DODO.methods.withdrawBase(decimalStr("1")).send(ctx.sendParam(lp1)),
/NO_BASE_LP/
)
await assert.rejects(
ctx.DODO.methods.withdrawQuote(decimalStr("1")).send(ctx.sendParam(lp1)),
/NO_QUOTE_LP/
)
})
})
})