Skip to content

Commit ba6945a

Browse files
committed
fix: fix tests order
1 parent ee96e4a commit ba6945a

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

services/workflows-service/src/transaction/transaction.controller.external.intg.test.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -542,34 +542,34 @@ describe('#TransactionControllerExternal', () => {
542542
message: 'Counterparty must have either business or end user data.',
543543
});
544544
});
545-
});
546545

547-
it('returns 400 when counterparty has both business and end user', async () => {
548-
// Arrange
549-
const apiKey = (customer.authenticationConfiguration as { authValue: string }).authValue;
550-
const validTransaction = getBaseTransactionData();
551-
const transactions = [
552-
{
553-
...validTransaction,
554-
originator: getBusinessCounterpartyData(),
555-
beneficiary: {
556-
...getBusinessCounterpartyData(),
557-
...getEndUserCounterpartyData(),
546+
it('returns 400 when counterparty has both business and end user', async () => {
547+
// Arrange
548+
const apiKey = (customer.authenticationConfiguration as { authValue: string }).authValue;
549+
const validTransaction = getBaseTransactionData();
550+
const transactions = [
551+
{
552+
...validTransaction,
553+
originator: getBusinessCounterpartyData(),
554+
beneficiary: {
555+
...getBusinessCounterpartyData(),
556+
...getEndUserCounterpartyData(),
557+
},
558558
},
559-
},
560-
] as const satisfies readonly TransactionCreateDto[];
561-
562-
// Act
563-
const response = await request(app.getHttpServer())
564-
.post('/external/transactions/bulk')
565-
.send(transactions)
566-
.set('authorization', `Bearer ${apiKey}`);
567-
568-
// Assert
569-
expect(response.status).toBe(400);
570-
expect(response.body).toEqual({
571-
statusCode: 400,
572-
message: 'Counterparty must have either business or end user data.',
559+
] as const satisfies readonly TransactionCreateDto[];
560+
561+
// Act
562+
const response = await request(app.getHttpServer())
563+
.post('/external/transactions/bulk')
564+
.send(transactions)
565+
.set('authorization', `Bearer ${apiKey}`);
566+
567+
// Assert
568+
expect(response.status).toBe(400);
569+
expect(response.body).toEqual({
570+
statusCode: 400,
571+
message: 'Counterparty must have either business or end user data.',
572+
});
573573
});
574574
});
575575
});

0 commit comments

Comments
 (0)