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

Commit 4dc422b

Browse files
committed
fix: 🐛 fixing ModifyKYCDataSigned test method
1 parent d3bc1c1 commit 4dc422b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,25 @@ describe('GeneralTransferManagerWrapper', () => {
639639
safetyFactor: 10,
640640
};
641641

642+
// Owner Address expected
643+
const expectedOwnerResult = '0x5555555555555555555555555555555555555555';
644+
// Security Token Address expected
645+
const expectedSecurityTokenAddress = '0x3333333333333333333333333333333333333333';
646+
647+
// Setup get Security Token Address
648+
const mockedGetSecurityTokenAddressMethod = mock(MockedCallMethod);
649+
when(mockedContract.securityToken).thenReturn(instance(mockedGetSecurityTokenAddressMethod));
650+
when(mockedGetSecurityTokenAddressMethod.callAsync()).thenResolve(expectedSecurityTokenAddress);
651+
when(mockedContractFactory.getSecurityTokenContract(expectedSecurityTokenAddress)).thenResolve(
652+
instance(mockedSecurityTokenContract),
653+
);
654+
const mockedSecurityTokenOwnerMethod = mock(MockedCallMethod);
655+
when(mockedSecurityTokenOwnerMethod.callAsync()).thenResolve(expectedOwnerResult);
656+
when(mockedSecurityTokenContract.owner).thenReturn(instance(mockedSecurityTokenOwnerMethod));
657+
658+
// Mock web3 wrapper owner
659+
when(mockedWrapper.getAvailableAddressesAsync()).thenResolve([expectedOwnerResult]);
660+
642661
// nonceMap
643662
const expectedNonceResult = false;
644663
const mockedNonceMethod = mock(MockedCallMethod);
@@ -693,6 +712,12 @@ describe('GeneralTransferManagerWrapper', () => {
693712
mockedParams.safetyFactor,
694713
),
695714
).once();
715+
verify(mockedContract.securityToken).once();
716+
verify(mockedGetSecurityTokenAddressMethod.callAsync()).once();
717+
verify(mockedContractFactory.getSecurityTokenContract(expectedSecurityTokenAddress)).once();
718+
verify(mockedSecurityTokenOwnerMethod.callAsync()).once();
719+
verify(mockedSecurityTokenContract.owner).once();
720+
verify(mockedWrapper.getAvailableAddressesAsync()).once();
696721
});
697722
});
698723

0 commit comments

Comments
 (0)