@@ -20,7 +20,15 @@ import {
20
20
ModuleRegistryContract ,
21
21
} from '@polymathnetwork/abi-wrappers' ;
22
22
import ERC20TokenWrapper from '../erc20_wrapper' ;
23
- import { ModuleType , ModuleName , Feature , FundRaiseType , PERCENTAGE_DECIMALS , FULL_DECIMALS } from '../../../types' ;
23
+ import {
24
+ ModuleType ,
25
+ ModuleName ,
26
+ Feature ,
27
+ FundRaiseType ,
28
+ PERCENTAGE_DECIMALS ,
29
+ FULL_DECIMALS ,
30
+ Partition ,
31
+ } from '../../../types' ;
24
32
import SecurityTokenWrapper from '../security_token_wrapper' ;
25
33
import ContractFactory from '../../../factories/contractFactory' ;
26
34
import {
@@ -105,7 +113,7 @@ describe('SecurityTokenWrapper', () => {
105
113
test ( 'should call to isOperatorForPartition' , async ( ) => {
106
114
const expectedResult = true ;
107
115
const mockedParams = {
108
- partition : 'UNLOCKED' ,
116
+ partition : Partition . Unlocked ,
109
117
operator : '0x5555555555555555555555555555555555555555' ,
110
118
tokenHolder : '0x4444444444444444444444444444444444444444' ,
111
119
} ;
@@ -323,7 +331,6 @@ describe('SecurityTokenWrapper', () => {
323
331
} ) ;
324
332
} ) ;
325
333
326
-
327
334
describe ( 'isOwner' , ( ) => {
328
335
test ( 'should call to isOwner' , async ( ) => {
329
336
const expectedResult = true ;
@@ -778,7 +785,7 @@ describe('SecurityTokenWrapper', () => {
778
785
const expectedResult = new BigNumber ( 1 ) ;
779
786
const mockedParams = {
780
787
tokenHolder : '0x1111111111111111111111111111111111111111' ,
781
- partition : 'UNLOCKED' ,
788
+ partition : Partition . Unlocked ,
782
789
} ;
783
790
784
791
const expectedDecimalsResult = new BigNumber ( 18 ) ;
@@ -1032,7 +1039,7 @@ describe('SecurityTokenWrapper', () => {
1032
1039
test ( 'should call to canTransferByPartition' , async ( ) => {
1033
1040
const expectedStatusCode = 'X' ;
1034
1041
const expectedReasonCode = 'Reason' ;
1035
- const expectedPartition = ' Partition' ;
1042
+ const expectedPartition = Partition . Unlocked ;
1036
1043
const expectedResult = [
1037
1044
expectedStatusCode ,
1038
1045
stringToBytes32 ( expectedReasonCode ) ,
@@ -2175,7 +2182,7 @@ describe('SecurityTokenWrapper', () => {
2175
2182
test ( 'should send the transaction to transferByPartition' , async ( ) => {
2176
2183
// Mocked parameters
2177
2184
const mockedParams = {
2178
- partition : 'UNLOCKED' ,
2185
+ partition : Partition . Unlocked ,
2179
2186
to : '0x2222222222222222222222222222222222222222' ,
2180
2187
value : new BigNumber ( 1 ) ,
2181
2188
data : 'string' ,
@@ -2298,7 +2305,7 @@ describe('SecurityTokenWrapper', () => {
2298
2305
test ( 'should send the transaction to authorizeOperatorByPartition' , async ( ) => {
2299
2306
// Mocked parameters
2300
2307
const mockedParams = {
2301
- partition : 'UNLOCKED' ,
2308
+ partition : Partition . Unlocked ,
2302
2309
operator : '0x2222222222222222222222222222222222222222' ,
2303
2310
txData : { } ,
2304
2311
safetyFactor : 10 ,
@@ -2341,7 +2348,7 @@ describe('SecurityTokenWrapper', () => {
2341
2348
test ( 'should send the transaction to revokeOperatorByPartition' , async ( ) => {
2342
2349
// Mocked parameters
2343
2350
const mockedParams = {
2344
- partition : 'UNLOCKED' ,
2351
+ partition : Partition . Unlocked ,
2345
2352
operator : '0x2222222222222222222222222222222222222222' ,
2346
2353
txData : { } ,
2347
2354
safetyFactor : 10 ,
@@ -2386,7 +2393,7 @@ describe('SecurityTokenWrapper', () => {
2386
2393
test ( 'should send the transaction to transferByPartition' , async ( ) => {
2387
2394
// Mocked parameters
2388
2395
const mockedParams = {
2389
- partition : 'UNLOCKED' ,
2396
+ partition : Partition . Unlocked ,
2390
2397
from : '0x2222222222222222222222222222222222222222' ,
2391
2398
to : '0x2222222222222222222222222222222222222222' ,
2392
2399
value : new BigNumber ( 1 ) ,
@@ -2582,7 +2589,7 @@ describe('SecurityTokenWrapper', () => {
2582
2589
test ( 'should send the transaction to issue' , async ( ) => {
2583
2590
// Mocked parameters
2584
2591
const mockedParams = {
2585
- partition : 'UNLOCKED' ,
2592
+ partition : Partition . Unlocked ,
2586
2593
investor : '0x1111111111111111111111111111111111111111' ,
2587
2594
value : new BigNumber ( 2 ) ,
2588
2595
data : 'string' ,
@@ -2807,7 +2814,7 @@ describe('SecurityTokenWrapper', () => {
2807
2814
test ( 'should send the transaction to redeem' , async ( ) => {
2808
2815
// Mocked parameters
2809
2816
const mockedParams = {
2810
- partition : 'UNLOCKED' ,
2817
+ partition : Partition . Unlocked ,
2811
2818
value : new BigNumber ( 1 ) ,
2812
2819
data : 'string' ,
2813
2820
txData : { } ,
@@ -2879,7 +2886,7 @@ describe('SecurityTokenWrapper', () => {
2879
2886
test ( 'should send the transaction to operatorRedeemByPartition' , async ( ) => {
2880
2887
// Mocked parameters
2881
2888
const mockedParams = {
2882
- partition : 'UNLOCKED' ,
2889
+ partition : Partition . Unlocked ,
2883
2890
tokenHolder : '0x9999999999999999999999999999999999999999' ,
2884
2891
value : new BigNumber ( 1 ) ,
2885
2892
data : 'string' ,
0 commit comments