-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -16,3 +16,6 @@ node/package-lock.json | |
|
||
# macOS | ||
.DS_Store | ||
|
||
# vsCode | ||
.vscode |
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,16 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import {Test, console2} from "forge-std/Test.sol"; | ||
|
||
import {SpendPermissions} from "../../../src/SpendPermissions.sol"; | ||
|
||
import {SpendPermissionsBase} from "../../base/SpendPermissionsBase.sol"; | ||
|
||
contract IsAuthorizedTest is Test, SpendPermissionsBase { | ||
function setUp() public { | ||
_initializeSpendPermissions(); | ||
} | ||
function test_isAuthorized_success_true() public {} | ||
function test_isAuthorized_success_false() public {} | ||
} |
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,17 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import {Test, console2} from "forge-std/Test.sol"; | ||
|
||
import {SpendPermissions} from "../../../src/SpendPermissions.sol"; | ||
|
||
import {SpendPermissionsBase} from "../../base/SpendPermissionsBase.sol"; | ||
|
||
contract PermitTest is Test, SpendPermissionsBase { | ||
function setUp() public { | ||
_initializeSpendPermissions(); | ||
} | ||
|
||
function test_permit_revert_unauthorizedRecurringAllowance() public {} | ||
function test_permit_success() public {} | ||
} |
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,17 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import {Test, console2} from "forge-std/Test.sol"; | ||
|
||
import {SpendPermissions} from "../../../src/SpendPermissions.sol"; | ||
|
||
import {SpendPermissionsBase} from "../../base/SpendPermissionsBase.sol"; | ||
|
||
contract RevokeTest is Test, SpendPermissionsBase { | ||
function setUp() public { | ||
_initializeSpendPermissions(); | ||
} | ||
|
||
function test_revoke_revert_invalidSender() public {} | ||
function test_revoke_success() public {} | ||
} |
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,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import {Test, console2} from "forge-std/Test.sol"; | ||
|
||
import {SpendPermissions} from "../../../src/SpendPermissions.sol"; | ||
|
||
import {SpendPermissionsBase} from "../../base/SpendPermissionsBase.sol"; | ||
|
||
contract WithdrawTest is Test, SpendPermissionsBase { | ||
function setUp() public { | ||
_initializeSpendPermissions(); | ||
} | ||
|
||
// TODO best way to indicate the two different versions of `withdraw` in test names? | ||
function test_withdraw_revert_invalidSender() public {} | ||
function test_withdraw_revert_unauthorizedRecurringAllowance() public {} | ||
function test_withdraw_success_ether() public {} | ||
function test_withdraw_success_ERC20() public {} | ||
} |