From 09927c81b1faa9b52966ffed89d1714e94697c9b Mon Sep 17 00:00:00 2001 From: chuacw <1757930+chuacw@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:23:55 +0800 Subject: [PATCH] Fixed test code --- test/HookDonation.t.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/HookDonation.t.sol b/test/HookDonation.t.sol index 47a9d1b..2d16b1d 100644 --- a/test/HookDonation.t.sol +++ b/test/HookDonation.t.sol @@ -106,6 +106,7 @@ contract DonationTest is Test, Deployers { console.log("enabled: %s", enabled); console.log("recipient: %s", recipient); console.log(); + assert(!enabled); enableDonation(RECIPIENT, 10); // recipient = 0x01, 10 percent console.log("After enabling donation"); @@ -114,6 +115,8 @@ contract DonationTest is Test, Deployers { recipient = donationRecipient(payee); console.log("enabled: %s", enabled); console.log("recipient: %s", recipient); + assert(enabled); + } function test_enableDonation() public { @@ -125,6 +128,7 @@ contract DonationTest is Test, Deployers { console.log("enabled: %s", enabled); console.log("recipient: %s", recipient); console.log(); + assert(!enabled); donationHook.enableDonation(RECIPIENT, 10); // recipient = 0x01, 10 percent console.log("After enabling donation"); @@ -133,6 +137,7 @@ contract DonationTest is Test, Deployers { recipient = donationHook.donationRecipient(payee); console.log("enabled: %s", enabled); console.log("recipient: %s", recipient); + assert(enabled); } function test_Donation() public {