-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add constructor test in batch and factory
- Loading branch information
1 parent
6a45b1c
commit 80087d1
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
test/integration/batch-lockup/constructor/constructor.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { SablierV2BatchLockup } from "src/SablierV2BatchLockup.sol"; | ||
|
||
import { Integration_Test } from "../../Integration.t.sol"; | ||
|
||
contract Constructor_BatchLockup_Integration_Test is Integration_Test { | ||
function setUp() public virtual override { | ||
Integration_Test.setUp(); | ||
} | ||
|
||
function test_Constructor() external { | ||
vm.expectEmit(); | ||
emit TransferAdmin({ oldAdmin: address(0), newAdmin: users.admin }); | ||
SablierV2BatchLockup batchLockup = new SablierV2BatchLockup(users.admin); | ||
|
||
address actualAdmin = batchLockup.admin(); | ||
address expectedAdmin = users.admin; | ||
assertEq(actualAdmin, expectedAdmin, "admin mismatch"); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
test/integration/merkle-lockup/factory/constructor/constructor.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity >=0.8.22 <0.9.0; | ||
|
||
import { SablierV2MerkleLockupFactory } from "src/SablierV2MerkleLockupFactory.sol"; | ||
|
||
import { MerkleLockup_Integration_Test } from "../../MerkleLockup.t.sol"; | ||
|
||
contract Constructor_BatchLockup_Integration_Test is MerkleLockup_Integration_Test { | ||
function setUp() public virtual override { | ||
MerkleLockup_Integration_Test.setUp(); | ||
} | ||
|
||
function test_Constructor() external { | ||
vm.expectEmit(); | ||
emit TransferAdmin({ oldAdmin: address(0), newAdmin: users.admin }); | ||
SablierV2MerkleLockupFactory merkleLockupFactory = new SablierV2MerkleLockupFactory(users.admin); | ||
|
||
address actualAdmin = merkleLockupFactory.admin(); | ||
address expectedAdmin = users.admin; | ||
assertEq(actualAdmin, expectedAdmin, "admin mismatch"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters