Skip to content

Commit

Permalink
add failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sirnicolaz committed Dec 5, 2023
1 parent 83cbc4c commit 6ada436
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/InternalMarket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,32 @@ describe("InternalMarket", async () => {
});
});

describe("deposit", async () => {
it("should call deposit on tokenInternal", async () => {
await internalMarket.connect(bob).deposit(10);
expect(governanceToken.wrap).calledWith(bob.address, 10);
});

it("should emit a Deposit event", async () => {
await expect(internalMarket.connect(bob).deposit(10))
.to.emit(internalMarket, "Deposited")
.withArgs(bob.address, 10);
});
});

describe("finalizeDeposit", async () => {
it("should call settle on tokenInternal", async () => {
await internalMarket.connect(bob).finalizeDeposit();
expect(governanceToken.settleTokens).calledWith(bob.address);
});

it("should emit a Settled event", async () => {
await expect(internalMarket.connect(bob).finalizeDeposit())
.to.emit(internalMarket, "Settled")
.withArgs(bob.address);
});
});

describe("withdraw", async () => {
let ts: number;

Expand Down

0 comments on commit 6ada436

Please sign in to comment.