Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
俞永鹏
openzeppelin-contracts-upgradeable
Commits
e1c0f3ea
Unverified
Commit
e1c0f3ea
authored
Aug 02, 2021
by
William Entriken
Committed by
GitHub
Aug 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests for RFC 2606 (#2802)
parent
8bcf0ad7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ERC721.behavior.js
test/token/ERC721/ERC721.behavior.js
+2
-2
ERC721URIStorage.test.js
test/token/ERC721/extensions/ERC721URIStorage.test.js
+2
-2
No files found.
test/token/ERC721/ERC721.behavior.js
View file @
e1c0f3ea
...
@@ -12,7 +12,7 @@ const Error = [ 'None', 'RevertWithMessage', 'RevertWithoutMessage', 'Panic' ]
...
@@ -12,7 +12,7 @@ const Error = [ 'None', 'RevertWithMessage', 'RevertWithoutMessage', 'Panic' ]
const
firstTokenId
=
new
BN
(
'5042'
);
const
firstTokenId
=
new
BN
(
'5042'
);
const
secondTokenId
=
new
BN
(
'79217'
);
const
secondTokenId
=
new
BN
(
'79217'
);
const
nonExistentTokenId
=
new
BN
(
'13'
);
const
nonExistentTokenId
=
new
BN
(
'13'
);
const
baseURI
=
'https://api.com/v1/'
;
const
baseURI
=
'https://api.
example.
com/v1/'
;
const
RECEIVER_MAGIC_VALUE
=
'0x150b7a02'
;
const
RECEIVER_MAGIC_VALUE
=
'0x150b7a02'
;
...
@@ -929,7 +929,7 @@ function shouldBehaveLikeERC721Metadata (errorPrefix, name, symbol, owner) {
...
@@ -929,7 +929,7 @@ function shouldBehaveLikeERC721Metadata (errorPrefix, name, symbol, owner) {
it
(
'token URI can be changed by changing the base URI'
,
async
function
()
{
it
(
'token URI can be changed by changing the base URI'
,
async
function
()
{
await
this
.
token
.
setBaseURI
(
baseURI
);
await
this
.
token
.
setBaseURI
(
baseURI
);
const
newBaseURI
=
'https://api.com/v2/'
;
const
newBaseURI
=
'https://api.
example.
com/v2/'
;
await
this
.
token
.
setBaseURI
(
newBaseURI
);
await
this
.
token
.
setBaseURI
(
newBaseURI
);
expect
(
await
this
.
token
.
tokenURI
(
firstTokenId
)).
to
.
be
.
equal
(
newBaseURI
+
firstTokenId
.
toString
());
expect
(
await
this
.
token
.
tokenURI
(
firstTokenId
)).
to
.
be
.
equal
(
newBaseURI
+
firstTokenId
.
toString
());
});
});
...
...
test/token/ERC721/extensions/ERC721URIStorage.test.js
View file @
e1c0f3ea
...
@@ -22,7 +22,7 @@ contract('ERC721URIStorage', function (accounts) {
...
@@ -22,7 +22,7 @@ contract('ERC721URIStorage', function (accounts) {
await
this
.
token
.
mint
(
owner
,
firstTokenId
);
await
this
.
token
.
mint
(
owner
,
firstTokenId
);
});
});
const
baseURI
=
'https://api.com/v1/'
;
const
baseURI
=
'https://api.
example.
com/v1/'
;
const
sampleUri
=
'mock://mytoken'
;
const
sampleUri
=
'mock://mytoken'
;
it
(
'it is empty by default'
,
async
function
()
{
it
(
'it is empty by default'
,
async
function
()
{
...
@@ -62,7 +62,7 @@ contract('ERC721URIStorage', function (accounts) {
...
@@ -62,7 +62,7 @@ contract('ERC721URIStorage', function (accounts) {
await
this
.
token
.
setBaseURI
(
baseURI
);
await
this
.
token
.
setBaseURI
(
baseURI
);
await
this
.
token
.
setTokenURI
(
firstTokenId
,
sampleUri
);
await
this
.
token
.
setTokenURI
(
firstTokenId
,
sampleUri
);
const
newBaseURI
=
'https://api.com/v2/'
;
const
newBaseURI
=
'https://api.
example.
com/v2/'
;
await
this
.
token
.
setBaseURI
(
newBaseURI
);
await
this
.
token
.
setBaseURI
(
newBaseURI
);
expect
(
await
this
.
token
.
tokenURI
(
firstTokenId
)).
to
.
be
.
equal
(
newBaseURI
+
sampleUri
);
expect
(
await
this
.
token
.
tokenURI
(
firstTokenId
)).
to
.
be
.
equal
(
newBaseURI
+
sampleUri
);
});
});
...
...
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