From 3e7ca1aa633afb244f6530702af9a82bdffdcb75 Mon Sep 17 00:00:00 2001 From: Andrew Chiaramonte Date: Mon, 28 Oct 2024 12:10:42 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=E2=9C=85=20use=20constants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/KSXVault.t.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/KSXVault.t.sol b/test/KSXVault.t.sol index 73dc905..6652b26 100644 --- a/test/KSXVault.t.sol +++ b/test/KSXVault.t.sol @@ -150,7 +150,7 @@ contract KSXVaultAuctionTest is KSXVaultTest { ksxVault.createAuction(STARTING_BID); - vm.warp(block.timestamp + 1 weeks - 1); + vm.warp(block.timestamp + DEFAULT_EPOCH_DURATION - 1); assertEq(ksxVault.isAuctionReady(), false); vm.warp(block.timestamp + 1); assertEq(ksxVault.isAuctionReady(), true); @@ -170,7 +170,7 @@ contract KSXVaultAuctionTest is KSXVaultTest { vm.warp(block.timestamp + (DEFAULT_EPOCH_DURATION / 2)); assertEq(ksxVault.isAuctionReady(), false); vm.prank(PDAOADDR); - ksxVault.setEpochDuration(1 days); + ksxVault.setEpochDuration(MIN_EPOCH_DURATION); /// @dev you have to wait until the end of the epoch duration /// you just set (we were midway through the day because of (DEFAULT_EPOCH_DURATION / 2)) vm.warp(block.timestamp + .5 days - 1); @@ -184,20 +184,20 @@ contract KSXVaultAuctionTest is KSXVaultTest { ksxVault.createAuction(STARTING_BID); assertEq(ksxVault.isAuctionReady(), false); - vm.warp(block.timestamp + 1 days - 1); + vm.warp(block.timestamp + MIN_EPOCH_DURATION - 1); assertEq(ksxVault.isAuctionReady(), false); vm.warp(block.timestamp + 1); assertEq(ksxVault.isAuctionReady(), true); vm.prank(PDAOADDR); - ksxVault.setEpochDuration(4 weeks); + ksxVault.setEpochDuration(MAX_EPOCH_DURATION); assertEq(ksxVault.isAuctionReady(), false); vm.warp(block.timestamp + 3.5 weeks); assertEq(ksxVault.isAuctionReady(), true); - vm.warp(DEFAULT_START_TIME + 4 weeks - 1); + vm.warp(DEFAULT_START_TIME + MAX_EPOCH_DURATION - 1); assertEq(ksxVault.isAuctionReady(), false); - vm.warp(block.timestamp + 1 weeks + 1); + vm.warp(block.timestamp + DEFAULT_EPOCH_DURATION + 1); assertEq(ksxVault.isAuctionReady(), true); }