@@ -9,15 +9,12 @@ import ContractFactory from '../../../../factories/contractFactory';
9
9
import ModuleWrapper from '../../module_wrapper' ;
10
10
import {
11
11
bigNumberToDate ,
12
- dateArrayToBigNumberArray ,
13
12
dateToBigNumber ,
14
13
numberToBigNumber ,
15
14
valueToWei ,
16
- weiToValue ,
17
15
stringToBytes32 ,
18
- parsePartitionBytes32Value
19
16
} from '../../../../utils/convert' ;
20
- import { FlagsType , TransferType , Perm } from '../../../../types' ;
17
+ import { FlagsType , TransferType , Perm , Partition } from '../../../../types' ;
21
18
22
19
describe ( 'GeneralTransferManagerWrapper' , ( ) => {
23
20
let target : GeneralTransferManagerWrapper ;
@@ -570,7 +567,7 @@ describe('GeneralTransferManagerWrapper', () => {
570
567
describe ( 'GetAllInvestorFlags' , ( ) => {
571
568
test ( 'should getAllInvestorFlags' , async ( ) => {
572
569
// Address expected
573
- const expectedResult = [ [ '0x3333333333333333333333333333333333333333' ] , [ new BigNumber ( 2 ) ] ] ;
570
+ const expectedResult = [ [ '0x3333333333333333333333333333333333333333' , '0x4444444444444444444444444444444444444444' ] , [ new BigNumber ( 2 ) , new BigNumber ( 2 ) ] ] ;
574
571
// Mocked method
575
572
const mockedMethod = mock ( MockedCallMethod ) ;
576
573
// Stub the method
@@ -582,12 +579,14 @@ describe('GeneralTransferManagerWrapper', () => {
582
579
const result = await target . getAllInvestorFlags ( ) ;
583
580
584
581
// Result expectation
585
- expect ( result [ 0 ] ) . toEqual ( {
586
- canNotBuyFromSTO : true ,
587
- investor : expectedResult [ 0 ] [ 0 ] ,
588
- isAccredited : false ,
589
- isVolRestricted : false ,
590
- } ) ;
582
+ for ( let i = 0 ; i < expectedResult [ 0 ] . length ; i += 1 ) {
583
+ expect ( result [ i ] ) . toEqual ( {
584
+ canNotBuyFromSTO : true ,
585
+ investor : expectedResult [ 0 ] [ i ] ,
586
+ isAccredited : false ,
587
+ isVolRestricted : false ,
588
+ } ) ;
589
+ }
591
590
592
591
// Verifications
593
592
verify ( mockedContract . getAllInvestorFlags ) . once ( ) ;
@@ -1360,7 +1359,7 @@ describe('GeneralTransferManagerWrapper', () => {
1360
1359
when ( mockedSecurityTokenContract . decimals ) . thenReturn ( instance ( mockedSecurityTokenDecimalsMethod ) ) ;
1361
1360
1362
1361
const mockedParams = {
1363
- partition : "UNLOCKED" ,
1362
+ partition : Partition . Unlocked ,
1364
1363
tokenHolder : "0x2222222222222222222222222222222222222222" ,
1365
1364
additionalBalance : new BigNumber ( 100 )
1366
1365
} ;
0 commit comments