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
6191ccac
Commit
6191ccac
authored
Sep 19, 2016
by
Manuel Aráoz
Committed by
GitHub
Sep 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18 from adklempner/master
Test that Ownable prevents non-owners from changing ownership.
parents
50713039
6455b96c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
ownable.js
test/ownable.js
+15
-1
No files found.
test/ownable.js
View file @
6191ccac
...
...
@@ -10,7 +10,7 @@ contract('Ownable', function(accounts) {
it
(
"changes owner after transfer"
,
function
(
done
)
{
var
ownable
=
Ownable
.
deployed
();
var
other
=
'0xe682569efa3752a07fdc09885007c47beee803a7'
;
var
other
=
accounts
[
1
]
;
return
ownable
.
transfer
(
other
)
.
then
(
function
()
{
return
ownable
.
owner
();
...
...
@@ -20,4 +20,18 @@ contract('Ownable', function(accounts) {
})
.
then
(
done
)
});
it
(
"should prevent non-owners from transfering"
,
function
(
done
)
{
var
ownable
=
Ownable
.
deployed
();
var
other
=
accounts
[
2
];
return
ownable
.
transfer
(
other
,
{
from
:
accounts
[
2
]})
.
then
(
function
()
{
return
ownable
.
owner
();
})
.
then
(
function
(
owner
)
{
assert
.
isFalse
(
owner
===
other
);
})
.
then
(
done
)
});
});
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