1
- var SRTToken = artifacts . require ( "./SRTToken .sol" ) ;
1
+ var InviteToken = artifacts . require ( "./InviteToken .sol" ) ;
2
2
3
- contract ( 'SRTToken ' , function ( accounts ) {
3
+ contract ( 'InviteToken ' , function ( accounts ) {
4
4
it ( "should have decimal place of 18" , function ( ) {
5
- return SRTToken . deployed ( ) . then ( function ( instance ) {
5
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
6
6
return instance . decimals . call ( ) ;
7
7
} ) . then ( function ( decimals ) {
8
8
assert . equal ( decimals . valueOf ( ) , 18 , "18 decimals not found" ) ;
9
9
} ) ;
10
10
} ) ;
11
11
12
12
it ( "token should have a name" , function ( ) {
13
- return SRTToken . deployed ( ) . then ( function ( instance ) {
13
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
14
14
return instance . name . call ( ) ;
15
15
} ) . then ( function ( name ) {
16
16
assert . isDefined ( name . valueOf ( ) , 'token should have a name' ) ;
17
17
} ) ;
18
18
} ) ;
19
19
20
20
it ( "token should have a symbol" , function ( ) {
21
- return SRTToken . deployed ( ) . then ( function ( instance ) {
21
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
22
22
return instance . symbol . call ( ) ;
23
23
} ) . then ( function ( symbol ) {
24
24
assert . isDefined ( symbol . valueOf ( ) , 'token should have a symbol' ) ;
25
25
} ) ;
26
26
} ) ;
27
27
28
28
it ( "token should have a maxSupply" , function ( ) {
29
- return SRTToken . deployed ( ) . then ( function ( instance ) {
29
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
30
30
return instance . maxSupply . call ( ) ;
31
31
} ) . then ( function ( maxSupply ) {
32
32
assert . isDefined ( maxSupply . valueOf ( ) , 'token should have a maxSupply' ) ;
33
33
} ) ;
34
34
} ) ;
35
35
36
36
it ( "mint should throw error when tried by non owner account" , function ( ) {
37
- return SRTToken . deployed ( ) . then ( function ( instance ) {
37
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
38
38
return instance . mint . call ( 10000 , { from : accounts [ 1 ] } ) ;
39
39
} ) . then ( function ( minted ) {
40
40
assert . isFalse ( minted , "transaction should have thrown error" ) ;
@@ -44,7 +44,7 @@ contract('SRTToken', function(accounts) {
44
44
} ) ;
45
45
46
46
it ( "addWhiteListedContracts should throw error when tried by non owner account" , function ( ) {
47
- return SRTToken . deployed ( ) . then ( function ( instance ) {
47
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
48
48
return instance . addWhiteListedContracts . call ( accounts [ 2 ] , { from : accounts [ 1 ] } ) ;
49
49
} ) . then ( function ( minted ) {
50
50
assert . isFalse ( minted , "transaction should have thrown error" ) ;
@@ -56,7 +56,7 @@ contract('SRTToken', function(accounts) {
56
56
it ( "mint should throw error when tried to mint more than max supply" , function ( ) {
57
57
var token ;
58
58
59
- return SRTToken . deployed ( ) . then ( function ( instance ) {
59
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
60
60
token = instance ;
61
61
return token . maxSupply . call ( ) ;
62
62
} ) . then ( function ( maxSupply ) {
@@ -74,7 +74,7 @@ contract('SRTToken', function(accounts) {
74
74
var old_balance ;
75
75
var new_balance ;
76
76
77
- return SRTToken . deployed ( ) . then ( function ( instance ) {
77
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
78
78
token = instance ;
79
79
return token . balanceOf . call ( accounts [ 0 ] ) ;
80
80
} ) . then ( function ( balance ) {
@@ -102,7 +102,7 @@ contract('SRTToken', function(accounts) {
102
102
103
103
var amount = 10 ;
104
104
105
- return SRTToken . deployed ( ) . then ( function ( instance ) {
105
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
106
106
token = instance ;
107
107
return token . balanceOf . call ( account_one ) ;
108
108
} ) . then ( function ( balance ) {
@@ -137,7 +137,7 @@ contract('SRTToken', function(accounts) {
137
137
138
138
var amount = 10 ;
139
139
140
- return SRTToken . deployed ( ) . then ( function ( instance ) {
140
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
141
141
token = instance ;
142
142
return token . balanceOf . call ( account_one ) ;
143
143
} ) . then ( function ( balance ) {
@@ -168,7 +168,7 @@ contract('SRTToken', function(accounts) {
168
168
169
169
var amount = 10 ;
170
170
171
- return SRTToken . deployed ( ) . then ( function ( instance ) {
171
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
172
172
token = instance ;
173
173
return token . balanceOf . call ( account_one ) ;
174
174
} ) . then ( function ( balance ) {
@@ -199,7 +199,7 @@ contract('SRTToken', function(accounts) {
199
199
200
200
var amount = 10 ;
201
201
202
- return SRTToken . deployed ( ) . then ( function ( instance ) {
202
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
203
203
token = instance ;
204
204
return token . addWhiteListedContracts ( account_three ) ;
205
205
} ) . then ( function ( ) {
@@ -227,7 +227,7 @@ contract('SRTToken', function(accounts) {
227
227
228
228
var amount = 1 ;
229
229
230
- return SRTToken . deployed ( ) . then ( function ( instance ) {
230
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
231
231
token = instance ;
232
232
return token . approve ( accounts [ 2 ] , amount , { from :accounts [ 1 ] } ) ;
233
233
} ) . then ( function ( ) {
@@ -245,7 +245,7 @@ contract('SRTToken', function(accounts) {
245
245
var approval_starting_balance ;
246
246
var approval_ending_balance ;
247
247
248
- return SRTToken . deployed ( ) . then ( function ( instance ) {
248
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
249
249
token = instance ;
250
250
return token . allowance . call ( accounts [ 1 ] , accounts [ 2 ] ) ;
251
251
} ) . then ( function ( balance ) {
@@ -267,7 +267,7 @@ contract('SRTToken', function(accounts) {
267
267
var approval_starting_balance ;
268
268
var approval_ending_balance ;
269
269
270
- return SRTToken . deployed ( ) . then ( function ( instance ) {
270
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
271
271
token = instance ;
272
272
return token . allowance . call ( accounts [ 1 ] , accounts [ 2 ] ) ;
273
273
} ) . then ( function ( balance ) {
@@ -286,7 +286,7 @@ contract('SRTToken', function(accounts) {
286
286
287
287
var amount = 1 ;
288
288
289
- return SRTToken . deployed ( ) . then ( function ( instance ) {
289
+ return InviteToken . deployed ( ) . then ( function ( instance ) {
290
290
token = instance ;
291
291
return token . approve ( accounts [ 2 ] , amount , { from :accounts [ 1 ] } ) ;
292
292
} ) . then ( function ( status ) {
0 commit comments