From f659c0727c81dc2ac5ee93f292042de7c924d42d Mon Sep 17 00:00:00 2001 From: Geolffrey Mena Date: Mon, 29 Jul 2024 17:50:07 -0600 Subject: [PATCH] feat: added referendum contract --- test/Syndication.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/Syndication.ts b/test/Syndication.ts index 2e81dff..38e2845 100644 --- a/test/Syndication.ts +++ b/test/Syndication.ts @@ -55,6 +55,18 @@ describe("Syndication", function () { const fees = hre.ethers.parseUnits('0.3', 'ether'); // expected fees paid in contract.. const [owner,] = await getAccounts(); + const distributor: string = await loadFixture(deployDistributor) + const syndication = await loadFixture(deployInitializedSyndication) + // const registeredDistributor = await distributorRegisteredWithLastEvent(syndication) + await syndication.register(distributor, { value: fees }) + await syndication.quit(distributor); + expect(await syndication.quit(distributor)).to.emit(syndication, 'Resigned') + + }); + + it("Should retain the correct penalty amount after quit.", async function () { + const fees = hre.ethers.parseUnits('0.3', 'ether'); // expected fees paid in contract.. + const distributor: string = await loadFixture(deployDistributor) const syndication = await loadFixture(deployInitializedSyndication) // const registeredDistributor = await distributorRegisteredWithLastEvent(syndication) @@ -71,9 +83,6 @@ describe("Syndication", function () { // the contract keep the 10% expect(afterQuitBalance).to.be.equal(penal); - - - });