Skip to content

Commit

Permalink
feat(tests): test pausable on mint functions
Browse files Browse the repository at this point in the history
  • Loading branch information
owieth committed Aug 16, 2023
1 parent 551fe58 commit 68bd25f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/NFTIME.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ contract NFTIMETest is Test {
s_Nftime.mint{value: NFTIME_DAY_PRICE}(TIMESTAMP, NFTIME.Type.Minute);
}

/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
function test_RevertMintMinutePaused() public paused {
vm.expectRevert("Pausable: paused");
s_Nftime.mint{value: NFTIME_MINUTE_PRICE}(TIMESTAMP, NFTIME.Type.Minute);
}

/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
function test_RevertMintMinuteIfDateAlreadyMinted() public {
Expand Down Expand Up @@ -104,6 +111,13 @@ contract NFTIMETest is Test {
s_Nftime.mint{value: NFTIME_MINUTE_PRICE}(TIMESTAMP, NFTIME.Type.Day);
}

/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
function test_RevertMintDayPaused() public paused {
vm.expectRevert("Pausable: paused");
s_Nftime.mint{value: NFTIME_DAY_PRICE}(TIMESTAMP, NFTIME.Type.Minute);
}

/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
function test_RevertMintDayIfDateAlreadyMinted() public {
Expand Down Expand Up @@ -135,7 +149,8 @@ contract NFTIMETest is Test {
/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
function test_ShouldRevertWhenPausedMintRarity() public paused {
vm.expectRevert();
vm.expectRevert("Pausable: paused");
vm.prank(DEFAULT_ADMIN_ADDRESS);
s_Nftime.mintRarity("");
}

Expand Down

0 comments on commit 68bd25f

Please sign in to comment.