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
48fe7b8c
Commit
48fe7b8c
authored
Aug 23, 2018
by
Nicolás Venturo
Committed by
Matt Condon
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed .eq to .equal. (#1231)
parent
d58fac82
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
57 deletions
+57
-57
BurnableToken.behavior.js
test/token/ERC20/BurnableToken.behavior.js
+6
-6
MintableToken.behavior.js
test/token/ERC20/MintableToken.behavior.js
+1
-1
PausableToken.test.js
test/token/ERC20/PausableToken.test.js
+4
-4
StandardToken.test.js
test/token/ERC20/StandardToken.test.js
+40
-40
TokenVesting.test.js
test/token/ERC20/TokenVesting.test.js
+5
-5
ERC721BasicToken.behavior.js
test/token/ERC721/ERC721BasicToken.behavior.js
+1
-1
No files found.
test/token/ERC20/BurnableToken.behavior.js
View file @
48fe7b8c
...
@@ -30,14 +30,14 @@ function shouldBehaveLikeBurnableToken (owner, initialBalance, [burner]) {
...
@@ -30,14 +30,14 @@ function shouldBehaveLikeBurnableToken (owner, initialBalance, [burner]) {
it
(
'emits a burn event'
,
async
function
()
{
it
(
'emits a burn event'
,
async
function
()
{
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Burn'
);
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Burn'
);
event
.
args
.
burner
.
should
.
eq
(
owner
);
event
.
args
.
burner
.
should
.
eq
ual
(
owner
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
it
(
'emits a transfer event'
,
async
function
()
{
it
(
'emits a transfer event'
,
async
function
()
{
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Transfer'
);
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Transfer'
);
event
.
args
.
from
.
should
.
eq
(
owner
);
event
.
args
.
from
.
should
.
eq
ual
(
owner
);
event
.
args
.
to
.
should
.
eq
(
ZERO_ADDRESS
);
event
.
args
.
to
.
should
.
eq
ual
(
ZERO_ADDRESS
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
}
}
...
@@ -81,14 +81,14 @@ function shouldBehaveLikeBurnableToken (owner, initialBalance, [burner]) {
...
@@ -81,14 +81,14 @@ function shouldBehaveLikeBurnableToken (owner, initialBalance, [burner]) {
it
(
'emits a burn event'
,
async
function
()
{
it
(
'emits a burn event'
,
async
function
()
{
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Burn'
);
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Burn'
);
event
.
args
.
burner
.
should
.
eq
(
owner
);
event
.
args
.
burner
.
should
.
eq
ual
(
owner
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
it
(
'emits a transfer event'
,
async
function
()
{
it
(
'emits a transfer event'
,
async
function
()
{
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Transfer'
);
const
event
=
expectEvent
.
inLogs
(
this
.
logs
,
'Transfer'
);
event
.
args
.
from
.
should
.
eq
(
owner
);
event
.
args
.
from
.
should
.
eq
ual
(
owner
);
event
.
args
.
to
.
should
.
eq
(
ZERO_ADDRESS
);
event
.
args
.
to
.
should
.
eq
ual
(
ZERO_ADDRESS
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
event
.
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
}
}
...
...
test/token/ERC20/MintableToken.behavior.js
View file @
48fe7b8c
...
@@ -50,7 +50,7 @@ function shouldBehaveLikeMintableToken (owner, minter, [anyone]) {
...
@@ -50,7 +50,7 @@ function shouldBehaveLikeMintableToken (owner, minter, [anyone]) {
const
{
logs
}
=
await
this
.
token
.
finishMinting
({
from
});
const
{
logs
}
=
await
this
.
token
.
finishMinting
({
from
});
logs
.
length
.
should
.
be
.
equal
(
1
);
logs
.
length
.
should
.
be
.
equal
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'MintFinished'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'MintFinished'
);
});
});
});
});
...
...
test/token/ERC20/PausableToken.test.js
View file @
48fe7b8c
...
@@ -19,8 +19,8 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -19,8 +19,8 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits a Pause event'
,
async
function
()
{
it
(
'emits a Pause event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
pause
({
from
});
const
{
logs
}
=
await
this
.
token
.
pause
({
from
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Pause'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Pause'
);
});
});
});
});
...
@@ -61,8 +61,8 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -61,8 +61,8 @@ contract('PausableToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an Unpause event'
,
async
function
()
{
it
(
'emits an Unpause event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
unpause
({
from
});
const
{
logs
}
=
await
this
.
token
.
unpause
({
from
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Unpause'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Unpause'
);
});
});
});
});
...
...
test/token/ERC20/StandardToken.test.js
View file @
48fe7b8c
...
@@ -91,10 +91,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -91,10 +91,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
approve
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
approve
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
...
@@ -125,10 +125,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -125,10 +125,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
approve
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
approve
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
...
@@ -167,10 +167,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -167,10 +167,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
approve
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
approve
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
});
});
...
@@ -207,10 +207,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -207,10 +207,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits a transfer event'
,
async
function
()
{
it
(
'emits a transfer event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
transferFrom
(
owner
,
to
,
amount
,
{
from
:
spender
});
const
{
logs
}
=
await
this
.
token
.
transferFrom
(
owner
,
to
,
amount
,
{
from
:
spender
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Transfer'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Transfer'
);
logs
[
0
].
args
.
from
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
from
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
to
.
should
.
eq
(
to
);
logs
[
0
].
args
.
to
.
should
.
eq
ual
(
to
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
});
});
...
@@ -271,10 +271,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -271,10 +271,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
decreaseApproval
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
decreaseApproval
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
0
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
0
);
});
});
...
@@ -317,10 +317,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -317,10 +317,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
decreaseApproval
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
decreaseApproval
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
0
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
0
);
});
});
...
@@ -359,10 +359,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -359,10 +359,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
decreaseApproval
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
decreaseApproval
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
0
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
0
);
});
});
});
});
...
@@ -378,10 +378,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -378,10 +378,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
increaseApproval
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
increaseApproval
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
...
@@ -412,10 +412,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -412,10 +412,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
increaseApproval
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
increaseApproval
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
...
@@ -453,10 +453,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
...
@@ -453,10 +453,10 @@ contract('StandardToken', function ([_, owner, recipient, anotherAccount]) {
it
(
'emits an approval event'
,
async
function
()
{
it
(
'emits an approval event'
,
async
function
()
{
const
{
logs
}
=
await
this
.
token
.
increaseApproval
(
spender
,
amount
,
{
from
:
owner
});
const
{
logs
}
=
await
this
.
token
.
increaseApproval
(
spender
,
amount
,
{
from
:
owner
});
logs
.
length
.
should
.
eq
(
1
);
logs
.
length
.
should
.
eq
ual
(
1
);
logs
[
0
].
event
.
should
.
eq
(
'Approval'
);
logs
[
0
].
event
.
should
.
eq
ual
(
'Approval'
);
logs
[
0
].
args
.
owner
.
should
.
eq
(
owner
);
logs
[
0
].
args
.
owner
.
should
.
eq
ual
(
owner
);
logs
[
0
].
args
.
spender
.
should
.
eq
(
spender
);
logs
[
0
].
args
.
spender
.
should
.
eq
ual
(
spender
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
logs
[
0
].
args
.
value
.
should
.
be
.
bignumber
.
equal
(
amount
);
});
});
});
});
...
...
test/token/ERC20/TokenVesting.test.js
View file @
48fe7b8c
...
@@ -67,7 +67,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
...
@@ -67,7 +67,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
const
block
=
await
ethGetBlock
(
receipt
.
blockNumber
);
const
block
=
await
ethGetBlock
(
receipt
.
blockNumber
);
const
releaseTime
=
block
.
timestamp
;
const
releaseTime
=
block
.
timestamp
;
(
await
this
.
token
.
balanceOf
(
beneficiary
)).
should
.
bignumber
.
eq
(
(
await
this
.
token
.
balanceOf
(
beneficiary
)).
should
.
bignumber
.
eq
ual
(
amount
.
mul
(
releaseTime
-
this
.
start
).
div
(
this
.
duration
).
floor
()
amount
.
mul
(
releaseTime
-
this
.
start
).
div
(
this
.
duration
).
floor
()
);
);
});
});
...
@@ -82,14 +82,14 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
...
@@ -82,14 +82,14 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
await
this
.
vesting
.
release
(
this
.
token
.
address
);
await
this
.
vesting
.
release
(
this
.
token
.
address
);
const
expectedVesting
=
amount
.
mul
(
now
-
this
.
start
).
div
(
this
.
duration
).
floor
();
const
expectedVesting
=
amount
.
mul
(
now
-
this
.
start
).
div
(
this
.
duration
).
floor
();
(
await
this
.
token
.
balanceOf
(
beneficiary
)).
should
.
bignumber
.
eq
(
expectedVesting
);
(
await
this
.
token
.
balanceOf
(
beneficiary
)).
should
.
bignumber
.
eq
ual
(
expectedVesting
);
}
}
});
});
it
(
'should have released all after end'
,
async
function
()
{
it
(
'should have released all after end'
,
async
function
()
{
await
increaseTimeTo
(
this
.
start
+
this
.
duration
);
await
increaseTimeTo
(
this
.
start
+
this
.
duration
);
await
this
.
vesting
.
release
(
this
.
token
.
address
);
await
this
.
vesting
.
release
(
this
.
token
.
address
);
(
await
this
.
token
.
balanceOf
(
beneficiary
)).
should
.
bignumber
.
eq
(
amount
);
(
await
this
.
token
.
balanceOf
(
beneficiary
)).
should
.
bignumber
.
eq
ual
(
amount
);
});
});
it
(
'should be revoked by owner if revocable is set'
,
async
function
()
{
it
(
'should be revoked by owner if revocable is set'
,
async
function
()
{
...
@@ -114,7 +114,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
...
@@ -114,7 +114,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
await
this
.
vesting
.
revoke
(
this
.
token
.
address
,
{
from
:
owner
});
await
this
.
vesting
.
revoke
(
this
.
token
.
address
,
{
from
:
owner
});
(
await
this
.
token
.
balanceOf
(
owner
)).
should
.
bignumber
.
eq
(
amount
.
sub
(
vested
));
(
await
this
.
token
.
balanceOf
(
owner
)).
should
.
bignumber
.
eq
ual
(
amount
.
sub
(
vested
));
});
});
it
(
'should keep the vested tokens when revoked by owner'
,
async
function
()
{
it
(
'should keep the vested tokens when revoked by owner'
,
async
function
()
{
...
@@ -126,7 +126,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
...
@@ -126,7 +126,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
const
vestedPost
=
await
this
.
vesting
.
vestedAmount
(
this
.
token
.
address
);
const
vestedPost
=
await
this
.
vesting
.
vestedAmount
(
this
.
token
.
address
);
vestedPre
.
should
.
bignumber
.
eq
(
vestedPost
);
vestedPre
.
should
.
bignumber
.
eq
ual
(
vestedPost
);
});
});
it
(
'should fail to be revoked a second time'
,
async
function
()
{
it
(
'should fail to be revoked a second time'
,
async
function
()
{
...
...
test/token/ERC721/ERC721BasicToken.behavior.js
View file @
48fe7b8c
...
@@ -117,7 +117,7 @@ function shouldBehaveLikeERC721BasicToken (accounts) {
...
@@ -117,7 +117,7 @@ function shouldBehaveLikeERC721BasicToken (accounts) {
(
await
this
.
token
.
tokenOfOwnerByIndex
(
this
.
to
,
0
)).
toNumber
().
should
.
be
.
equal
(
tokenId
);
(
await
this
.
token
.
tokenOfOwnerByIndex
(
this
.
to
,
0
)).
toNumber
().
should
.
be
.
equal
(
tokenId
);
(
await
this
.
token
.
tokenOfOwnerByIndex
(
owner
,
0
)).
toNumber
().
should
.
not
.
be
.
eq
(
tokenId
);
(
await
this
.
token
.
tokenOfOwnerByIndex
(
owner
,
0
)).
toNumber
().
should
.
not
.
be
.
eq
ual
(
tokenId
);
});
});
};
};
...
...
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