Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit 8879b44

Browse files
committed
fix: 🐛 improvements requested by VictorW
1 parent 4fdea9b commit 8879b44

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/contract_wrappers/modules/transfer_manager/__tests__/general_transfer_manager_wrapper.test.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ import ContractFactory from '../../../../factories/contractFactory';
99
import ModuleWrapper from '../../module_wrapper';
1010
import {
1111
bigNumberToDate,
12-
dateArrayToBigNumberArray,
1312
dateToBigNumber,
1413
numberToBigNumber,
1514
valueToWei,
16-
weiToValue,
1715
stringToBytes32,
18-
parsePartitionBytes32Value
1916
} from '../../../../utils/convert';
20-
import { FlagsType, TransferType, Perm } from '../../../../types';
17+
import { FlagsType, TransferType, Perm, Partition } from '../../../../types';
2118

2219
describe('GeneralTransferManagerWrapper', () => {
2320
let target: GeneralTransferManagerWrapper;
@@ -570,7 +567,7 @@ describe('GeneralTransferManagerWrapper', () => {
570567
describe('GetAllInvestorFlags', () => {
571568
test('should getAllInvestorFlags', async () => {
572569
// Address expected
573-
const expectedResult = [['0x3333333333333333333333333333333333333333'], [new BigNumber(2)]];
570+
const expectedResult = [['0x3333333333333333333333333333333333333333', '0x4444444444444444444444444444444444444444'], [new BigNumber(2), new BigNumber(2)]];
574571
// Mocked method
575572
const mockedMethod = mock(MockedCallMethod);
576573
// Stub the method
@@ -582,12 +579,14 @@ describe('GeneralTransferManagerWrapper', () => {
582579
const result = await target.getAllInvestorFlags();
583580

584581
// 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+
}
591590

592591
// Verifications
593592
verify(mockedContract.getAllInvestorFlags).once();
@@ -1360,7 +1359,7 @@ describe('GeneralTransferManagerWrapper', () => {
13601359
when(mockedSecurityTokenContract.decimals).thenReturn(instance(mockedSecurityTokenDecimalsMethod));
13611360

13621361
const mockedParams = {
1363-
partition: "UNLOCKED",
1362+
partition: Partition.Unlocked,
13641363
tokenHolder: "0x2222222222222222222222222222222222222222",
13651364
additionalBalance: new BigNumber(100)
13661365
};

0 commit comments

Comments
 (0)