diff --git a/test/Vault.tests.js b/test/Vault.tests.js index 44f702d..b4bc9c4 100644 --- a/test/Vault.tests.js +++ b/test/Vault.tests.js @@ -503,6 +503,12 @@ describe("Vault", function () { expect(await getBalance(receiver)).to.equal(total) }) + it("rejects negative flows", async function() { + await expect( + vault.flow(context, sender, receiver, -1) + ).to.be.revertedWith("NegativeFlow") + }) + it("rejects flow when insufficient available tokens", async function () { const duration = maximum - (await currentTime()) const rate = Math.round(deposit / duration)