mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-04 20:43:40 +00:00
refactor( iam ): replace prisma.user joins with batch IAM fetch in bookings, tickets, and payments e2e
This commit is contained in:
@@ -21,11 +21,7 @@ describe('Payments E2E', () => {
|
||||
|
||||
prisma = app.get<PrismaService>(PrismaService);
|
||||
|
||||
const testUser = await prisma.user.create({
|
||||
data: { email: 'payment-test@example.com', phone: '+251911111112', fullName: 'Payment Test User', passwordHash: '$2b$10$abcdefghijklmnopqrstuvwxyz', role: 'PASSENGER' },
|
||||
});
|
||||
|
||||
const passenger = await prisma.passenger.create({ data: { userId: testUser.id } });
|
||||
const passenger = await prisma.passenger.create({ data: { iamUserId: 'test-iam-payments-user' } });
|
||||
|
||||
await prisma.walletAccount.create({ data: { passengerId: passenger.id, balanceMinor: 100000, currency: 'ETB' } });
|
||||
|
||||
@@ -77,7 +73,6 @@ describe('Payments E2E', () => {
|
||||
prisma.walletLedgerEntry.deleteMany(),
|
||||
prisma.walletAccount.deleteMany(),
|
||||
prisma.passenger.deleteMany(),
|
||||
prisma.user.deleteMany({ where: { email: 'payment-test@example.com' } }),
|
||||
]);
|
||||
await app.close();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user