Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
46acd204
Commit
46acd204
authored
Mar 30, 2023
by
James Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update test names to style guide
parent
630c876b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Optimist.t.sol
...ontracts-periphery/contracts/foundry-tests/Optimist.t.sol
+10
-10
No files found.
packages/contracts-periphery/contracts/foundry-tests/Optimist.t.sol
View file @
46acd204
...
...
@@ -175,7 +175,7 @@ contract OptimistTest is Optimist_Initializer {
* @dev The baseURI should be set by attestation station
* by the owner of contract alice_admin
*/
function test_baseURI_succeeds() external {
function test_baseURI_
returnsCorrectBaseURI_
succeeds() external {
attestBaseuri(base_uri);
bytes memory data = abi.encodeWithSelector(
...
...
@@ -195,7 +195,7 @@ contract OptimistTest is Optimist_Initializer {
* @dev The tokenURI should return the token uri
* for a minted token
*/
function test_tokenURI_succeeds() external {
function test_tokenURI_
returnsCorrectTokenURI_
succeeds() external {
attestAllowlist(bob);
// we are using true but it can be any non empty value
attestBaseuri(base_uri);
...
...
@@ -214,9 +214,9 @@ contract OptimistTest is Optimist_Initializer {
}
/**
* @dev Should return a boolean of if the address is
white
listed
* @dev Should return a boolean of if the address is
allow
listed
*/
function test_
optimist_is_on_allow_list
() external {
function test_
isOnAllowlist_returnsTrueForAllowlistedAddresses_succeeds
() external {
attestAllowlist(bob);
bytes memory data = abi.encodeWithSelector(
...
...
@@ -242,7 +242,7 @@ contract OptimistTest is Optimist_Initializer {
/**
* @dev Should return the token id of the owner
*/
function test_
optimist_token_id_of_owner
() external {
function test_
tokenIdOfAddress_returnsOwnerID_succeeds
() external {
// whitelist bob
uint256 willTokenId = 1024;
address will = address(1024);
...
...
@@ -257,7 +257,7 @@ contract OptimistTest is Optimist_Initializer {
/**
* @dev It should revert if anybody attemps token transfer
*/
function test_
optimist_sbt_transfer
() external {
function test_
transferFrom_reverts
() external {
attestAllowlist(bob);
// mint as bob
...
...
@@ -282,7 +282,7 @@ contract OptimistTest is Optimist_Initializer {
/**
* @dev It should revert if anybody attemps approve
*/
function test_
optimist_sbt_approve
() external {
function test_
approve_reverts
() external {
attestAllowlist(bob);
// mint as bob
...
...
@@ -300,7 +300,7 @@ contract OptimistTest is Optimist_Initializer {
/**
* @dev It should be able to burn token
*/
function test_
optimist_burn
() external {
function test_
burn_byOwner_succeeds
() external {
attestAllowlist(bob);
// mint as bob
...
...
@@ -318,7 +318,7 @@ contract OptimistTest is Optimist_Initializer {
/**
* @dev setApprovalForAll should revert as sbt
*/
function test_
optimist_set_approval_for_all
() external {
function test_
setApprovalForAll_reverts
() external {
attestAllowlist(bob);
// mint as bob
...
...
@@ -337,7 +337,7 @@ contract OptimistTest is Optimist_Initializer {
/**
* @dev should support erc721 interface
*/
function test_
optimist_supports_interface
() external {
function test_
supportsInterface_returnsCorrectInterfaceForERC721_succeeds
() external {
bytes4 iface721 = type(IERC721).interfaceId;
// check that it supports erc721 interface
assertEq(optimist.supportsInterface(iface721), true);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment