Skip to content

Commit bdee0a6

Browse files
author
Victor Wiebe
committed
fix: bug with mintTokens test
1 parent 79d62fa commit bdee0a6

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

src/procedures/__tests__/MintTokens.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,16 @@ describe('MintTokens', () => {
154154
});
155155

156156
test('should throw an error for an expired Kyc', async () => {
157-
const shareHoldersExpiredKyc = [
158-
{
159-
address: testAddress,
160-
canSendAfter: new Date(Date.now()),
161-
canReceiveAfter: new Date(0),
162-
kycExpiry: new Date(0),
163-
canBuyFromSto: true,
164-
isAccredited: true,
165-
},
166-
];
157+
const expiredParams = params;
158+
expiredParams.mintingData[0].shareholderData = {
159+
canSendAfter: new Date(Date.now()),
160+
canReceiveAfter: new Date(2035, 1),
161+
kycExpiry: new Date(2000, 1),
162+
canBuyFromSto: true,
163+
isAccredited: true,
164+
};
167165

168-
shareholdersEntityMock.mock('getShareholders', shareHoldersExpiredKyc);
166+
target = new MintTokens(expiredParams, contextMock.getMockInstance());
169167
await expect(target.prepareTransactions()).rejects.toThrow(
170168
new PolymathError({
171169
code: ErrorCode.ProcedureValidationError,

0 commit comments

Comments
 (0)