Skip to content

Commit

Permalink
✅ adjust to frozen terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Sep 11, 2024
1 parent 9b59063 commit 4a45478
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions test/Auction.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -197,43 +197,43 @@ contract AuctionTest is Test, Constants, ConsolidatedEvents {
vm.stopPrank();
}

function test_cannot_place_bid_bidding_locked() public {
function test_cannot_place_bid_bidding_frozen() public {
startAuction(AUCTION_TEST_VALUE);

// Lock bidding
vm.prank(OWNER);
auction.lockBidding();
auction.freezeBidding();

// Try placing a bid
vm.startPrank(ACTOR1);
kwenta.approve(address(auction), TEST_VALUE);

vm.expectRevert(Auction.BiddingLockedErr.selector);
vm.expectRevert(Auction.BiddingFrozenErr.selector);
auction.bid(TEST_VALUE);
vm.stopPrank();

vm.prank(OWNER);
auction.unlockBidding();
auction.resumeBidding();

placeBid(ACTOR1, TEST_VALUE);
}

function test_lock_bidding_event() public {
function test_freeze_bidding_event() public {
startAuction(AUCTION_TEST_VALUE);

vm.prank(OWNER);
vm.expectEmit(true, true, true, true);
emit BiddingLocked();
auction.lockBidding();
emit BiddingFrozen();
auction.freezeBidding();
}

function test_unlock_bidding_event() public {
function test_resume_bidding_event() public {
startAuction(AUCTION_TEST_VALUE);

vm.prank(OWNER);
vm.expectEmit(true, true, true, true);
emit BiddingUnlocked();
auction.unlockBidding();
emit BiddingResumed();
auction.resumeBidding();
}

/*//////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions test/utils/ConsolidatedEvents.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ contract ConsolidatedEvents {

event BidBufferUpdated(uint256 newBidIncrement);

event BiddingLocked();
event BiddingFrozen();

event BiddingUnlocked();
event BiddingResumed();

event FundsWithdrawn(
address indexed owner, uint256 usdcAmount, uint256 kwentaAmount
Expand Down

0 comments on commit 4a45478

Please sign in to comment.