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
c70a0cfd
Commit
c70a0cfd
authored
Nov 01, 2016
by
Manuel Aráoz
Committed by
GitHub
Nov 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #46 from adklempner/standard-token-tests
Add test for StandardToken
parents
5683417d
aa3cd8c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
StandardToken.js
test/StandardToken.js
+16
-0
No files found.
test/StandardToken.js
View file @
c70a0cfd
...
...
@@ -78,4 +78,20 @@ contract('StandardToken', function(accounts) {
.
then
(
done
);
});
it
(
"should throw an error when trying to transfer more than allowed"
,
function
(
done
)
{
var
token
;
return
StandardTokenMock
.
new
(
accounts
[
0
],
100
)
.
then
(
function
(
_token
)
{
token
=
_token
;
return
token
.
approve
(
accounts
[
1
],
99
);
})
.
then
(
function
()
{
return
token
.
transferFrom
(
accounts
[
0
],
accounts
[
2
],
100
,
{
from
:
accounts
[
1
]});
})
.
catch
(
function
(
error
)
{
if
(
error
.
message
.
search
(
'invalid JUMP'
)
==
-
1
)
throw
error
})
.
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