Skip to content

Commit

Permalink
Fixed test code
Browse files Browse the repository at this point in the history
  • Loading branch information
chuacw committed Sep 10, 2024
1 parent 12d0921 commit 09927c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/HookDonation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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 {
Expand All @@ -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");
Expand All @@ -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 {
Expand Down

0 comments on commit 09927c8

Please sign in to comment.