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
7532dab1
Unverified
Commit
7532dab1
authored
Jan 15, 2018
by
Francisco Giordano
Committed by
GitHub
Jan 15, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #677 from ernestas2k/fix/error-testing-in-delayed-claimable#672
Fix error testing in DelayClaimable tests
parents
73a8be14
c9fff647
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
DelayedClaimble.test.js
test/DelayedClaimble.test.js
+4
-14
No files found.
test/DelayedClaimble.test.js
View file @
7532dab1
import
assertRevert
from
'./helpers/assertRevert'
;
var
DelayedClaimable
=
artifacts
.
require
(
'../contracts/ownership/DelayedClaimable.sol'
);
var
DelayedClaimable
=
artifacts
.
require
(
'../contracts/ownership/DelayedClaimable.sol'
);
contract
(
'DelayedClaimable'
,
function
(
accounts
)
{
contract
(
'DelayedClaimable'
,
function
(
accounts
)
{
...
@@ -42,25 +44,13 @@ contract('DelayedClaimable', function (accounts) {
...
@@ -42,25 +44,13 @@ contract('DelayedClaimable', function (accounts) {
assert
.
equal
(
start
,
100
);
assert
.
equal
(
start
,
100
);
let
pendingOwner
=
await
delayedClaimable
.
pendingOwner
();
let
pendingOwner
=
await
delayedClaimable
.
pendingOwner
();
assert
.
equal
(
pendingOwner
,
accounts
[
1
]);
assert
.
equal
(
pendingOwner
,
accounts
[
1
]);
var
err
=
null
;
await
assertRevert
(
delayedClaimable
.
claimOwnership
({
from
:
accounts
[
1
]
}));
try
{
await
delayedClaimable
.
claimOwnership
({
from
:
accounts
[
1
]
});
}
catch
(
error
)
{
err
=
error
;
}
assert
.
isFalse
(
err
.
message
.
search
(
'revert'
)
===
-
1
);
let
owner
=
await
delayedClaimable
.
owner
();
let
owner
=
await
delayedClaimable
.
owner
();
assert
.
isTrue
(
owner
!==
accounts
[
1
]);
assert
.
isTrue
(
owner
!==
accounts
[
1
]);
});
});
it
(
'set end and start invalid values fail'
,
async
function
()
{
it
(
'set end and start invalid values fail'
,
async
function
()
{
await
delayedClaimable
.
transferOwnership
(
accounts
[
1
]);
await
delayedClaimable
.
transferOwnership
(
accounts
[
1
]);
var
err
=
null
;
await
assertRevert
(
delayedClaimable
.
setLimits
(
1001
,
1000
));
try
{
await
delayedClaimable
.
setLimits
(
1001
,
1000
);
}
catch
(
error
)
{
err
=
error
;
}
assert
.
isFalse
(
err
.
message
.
search
(
'revert'
)
===
-
1
);
});
});
});
});
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