@@ -73,7 +73,9 @@ contract SweepCurrencyTest is BttBase {
7373 public
7474 givenEndBlockIsCheckpointed
7575 {
76- // it reverts with {NotGraduated}
76+ // it writes sweepCurrencyBlock
77+ // it does not transfer currency to funds recipient
78+ // it emits {CurrencySwept} with zero amount
7779
7880 vm.deal (address (this ), type (uint256 ).max);
7981 vm.assume (_bidAmount > 0 );
@@ -99,14 +101,22 @@ contract SweepCurrencyTest is BttBase {
99101 // max price must be > 1 (given min tick spacing)
100102
101103 uint256 maxPrice = mParams.parameters.floorPrice + mParams.parameters.tickSpacing;
102- uint256 bidId = auction.submitBid {value: _bidAmount}(maxPrice, _bidAmount, owner, bytes ('' ));
104+ auction.submitBid {value: _bidAmount}(maxPrice, _bidAmount, owner, bytes ('' ));
103105
104106 vm.roll (mParams.parameters.endBlock);
105- auction.exitPartiallyFilledBid (bidId, mParams.parameters.startBlock, 0 );
107+ auction.checkpoint ();
108+
109+ uint256 fundsRecipientBalanceBefore = mParams.parameters.fundsRecipient.balance;
110+ uint256 auctionBalanceBefore = address (auction).balance;
106111
112+ vm.expectEmit (true , true , true , true );
113+ emit IAuctionStorage.CurrencySwept (mParams.parameters.fundsRecipient, 0 );
107114 vm.prank (mParams.parameters.fundsRecipient);
108- vm.expectRevert (IAuctionStorage.NotGraduated.selector );
109115 auction.sweepCurrency ();
116+
117+ assertEq (auction.sweepCurrencyBlock (), block .number );
118+ assertEq (mParams.parameters.fundsRecipient.balance, fundsRecipientBalanceBefore);
119+ assertEq (address (auction).balance, auctionBalanceBefore);
110120 }
111121
112122 modifier givenAuctionIsGraduated () {
0 commit comments