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
43321353
Commit
43321353
authored
Nov 29, 2017
by
zava
Committed by
Alejandro Santander
Jan 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed events names on inheritable test
parent
560a855d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
Inheritable.js
test/Inheritable.js
+8
-9
No files found.
test/Inheritable.js
View file @
43321353
...
...
@@ -66,7 +66,7 @@ contract('Inheritable', function(accounts) {
const
heir
=
accounts
[
1
]
await
inheritable
.
setHeir
(
heir
,
{
from
:
owner
})
await
inheritable
.
pro
nounce
Death
({
from
:
heir
})
await
inheritable
.
pro
claim
Death
({
from
:
heir
})
try
{
await
inheritable
.
setHeartbeatTimeout
(
newTimeout
,
{
from
:
owner
})
...
...
@@ -88,7 +88,7 @@ contract('Inheritable', function(accounts) {
assertJump
(
error
)
}
await
inheritable
.
pro
nounce
Death
({
from
:
heir
})
await
inheritable
.
pro
claim
Death
({
from
:
heir
})
await
increaseTime
(
1
)
try
{
await
inheritable
.
inherit
({
from
:
heir
})
...
...
@@ -107,7 +107,7 @@ contract('Inheritable', function(accounts) {
await
inheritable
.
setHeir
(
heir
,
{
from
:
owner
})
await
inheritable
.
setHeartbeatTimeout
(
4141
,
{
from
:
owner
})
await
inheritable
.
pro
nounce
Death
({
from
:
heir
})
await
inheritable
.
pro
claim
Death
({
from
:
heir
})
await
inheritable
.
heartbeat
({
from
:
owner
})
try
{
await
inheritable
.
inherit
({
from
:
heir
})
...
...
@@ -116,7 +116,7 @@ contract('Inheritable', function(accounts) {
assertJump
(
error
)
}
await
inheritable
.
pro
nounce
Death
({
from
:
heir
})
await
inheritable
.
pro
claim
Death
({
from
:
heir
})
await
increaseTime
(
4141
)
await
inheritable
.
heartbeat
({
from
:
owner
})
try
{
...
...
@@ -141,17 +141,17 @@ contract('Inheritable', function(accounts) {
assert
.
isTrue
(
heartbeatEvent
.
args
.
owner
===
owner
)
const
pro
nounceDeathLogs
=
(
await
inheritable
.
pronounce
Death
({
from
:
heir
})).
logs
const
ownerDeadEvent
=
pro
nounceDeathLogs
.
find
(
e
=>
e
.
event
===
'OwnerPronounc
edDead'
)
const
pro
claimDeathLogs
=
(
await
inheritable
.
proclaim
Death
({
from
:
heir
})).
logs
const
ownerDeadEvent
=
pro
claimDeathLogs
.
find
(
e
=>
e
.
event
===
'OwnerProclaim
edDead'
)
assert
.
isTrue
(
ownerDeadEvent
.
args
.
owner
===
owner
)
assert
.
isTrue
(
ownerDeadEvent
.
args
.
heir
===
heir
)
const
inheritLogs
=
(
await
inheritable
.
inherit
({
from
:
heir
})).
logs
const
ownershipTransferredEvent
=
inheritLogs
.
find
(
e
=>
e
.
event
===
'
OwnershipTransferr
ed'
)
const
ownershipTransferredEvent
=
inheritLogs
.
find
(
e
=>
e
.
event
===
'
Inherit
ed'
)
assert
.
isTrue
(
ownershipTransferredEvent
.
args
.
previousOwner
===
owner
)
assert
.
isTrue
(
ownershipTransferredEvent
.
args
.
newOwner
===
heir
)
})
})
\ No newline at end of file
})
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