I am following the new foundry course by Patrick and was wondering if I could get tips on how to test the deploy script - https://github.com/Cyfrin/foundry-smart-contract-lottery-f23/blob/main/script/DeployRaffle.s.sol
I am unable to brainstorm ideas on how the testing should happen:
contract DeployRaffleTest is Test {
uint256 entranceFee;
uint256 interval;
address vrfCoordinator;
bytes32 gasLane;
uint64 subscriptionId; //either get this from UI or make yourself
uint32 callbackGasLimit;
address link;
uint256 deployerKey;
HelperConfig helperConfig = new HelperConfig();
function setUp() public {
(
entranceFee,
interval,
vrfCoordinator,
gasLane,
subscriptionId,
callbackGasLimit,
,
deployerKey
) = helperConfig.activeNetworkConfig();
}
Raffle deployedRaffle;
// new Raffle(
// entranceFee,
// interval,
// vrfCoordinator,
// gasLane,
// subscriptionId,
// callbackGasLimit
// );
function testDeployRaffleReturnValuesAreNotNull() public {
DeployRaffle deployer = new DeployRaffle();
(deployedRaffle, helperConfig) = deployer.run();
assert(address(deployedRaffle) != address(0));
assert(address(helperConfig) != address(0));
}
}
Please guide.