From 14e515b43f7afe3a2e4ea7dc7669f687a312ba25 Mon Sep 17 00:00:00 2001 From: Jonathan Diep Date: Mon, 8 Apr 2024 21:20:20 -0700 Subject: [PATCH] test: Add fuzz test to timestamp in `claimReferralFees` --- test/Quest.t.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Quest.t.sol b/test/Quest.t.sol index 424a6cd6..3ce4b994 100644 --- a/test/Quest.t.sol +++ b/test/Quest.t.sol @@ -330,7 +330,8 @@ contract TestQuest is Test, TestUtils, Errors, Events { CLAIM REFERRAL FEES //////////////////////////////////////////////////////////////*/ - function testFuzz_claimReferralFees() public { + function test_fuzz_claimReferralFees(uint96 timestamp) public { + vm.assume(timestamp > END_TIME); QuestFactoryMock(questFactoryMock).setMintFee(CLAIM_FEE); QuestFactoryMock(questFactoryMock).setNumberMinted(TOTAL_PARTICIPANTS); @@ -360,7 +361,7 @@ contract TestQuest is Test, TestUtils, Errors, Events { "referral claims for all referrers should equal the reward amount (single claim)" ); - vm.warp(END_TIME); + vm.warp(timestamp); vm.prank(referrer); quest.claimReferralFees(referrer);