Skip to content

Commit

Permalink
test: Update quest setup comments and withdrawal state
Browse files Browse the repository at this point in the history
  • Loading branch information
mmackz committed Sep 12, 2024
1 parent ac8087f commit be6fa60
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/QuestBudget.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1099,8 +1099,11 @@ contract QuestBudgetTest is Test, TestUtils, IERC1155Receiver {
vm.prank(questBudget.owner());
questBudget.setManagementFee(500); // 5%

// Create quest with standard parameters (60 participants, 1 ETH reward per participant)
// Setup quest with standard parameters (60 participants, 1 ETH reward per participant)
QuestSetupData memory data = setupQuestData();

// Simulate that the quest has already withdrawn
data.hasWithdrawn = true;
createQuest(data, questBudget.owner());

// Get balance after the quest has withdrawn
Expand Down Expand Up @@ -1128,7 +1131,6 @@ contract QuestBudgetTest is Test, TestUtils, IERC1155Receiver {

// Create quest with standard parameters (60 participants, 1 ETH reward per participant)
QuestSetupData memory data = setupQuestData();
data.hasWithdrawn = false;
createQuest(data, questBudget.owner());

vm.expectRevert("Management fee cannot be claimed until the quest rewards are withdrawn");
Expand Down Expand Up @@ -1163,8 +1165,11 @@ contract QuestBudgetTest is Test, TestUtils, IERC1155Receiver {
vm.prank(questBudget.owner());
questBudget.setManagementFee(500); // 5%

// Create quest with standard parameters (60 participants, 1 ETH reward per participant)
// Setup quest with standard parameters (60 participants, 1 ETH reward per participant)
QuestSetupData memory data = setupQuestData();

// Simulate that the quest has already withdrawn
data.hasWithdrawn = true;
createQuest(data, questBudget.owner());

// Transfer 1 wei out of the budget
Expand All @@ -1185,6 +1190,9 @@ contract QuestBudgetTest is Test, TestUtils, IERC1155Receiver {
// Setup quest with standard parameters (60 participants, 1 ETH reward per participant)
QuestSetupData memory data = setupQuestData();

// Simulate that the quest has already withdrawn
data.hasWithdrawn = true;

// Set number minted to 10 (instead of 60)
data.numberMinted = 10;

Expand Down Expand Up @@ -1232,7 +1240,7 @@ contract QuestBudgetTest is Test, TestUtils, IERC1155Receiver {
projectName: "Test Project",
referralRewardFee: 250,
numberMinted: 60,
hasWithdrawn: true
hasWithdrawn: false
});
}

Expand Down

0 comments on commit be6fa60

Please sign in to comment.