Skip to content

Commit f3cb863

Browse files
committed
up
1 parent 3781122 commit f3cb863

3 files changed

Lines changed: 28 additions & 15 deletions

File tree

tests/integration/jobs/export-job-lifecycle.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ describe('Export Job Lifecycle (Integration)', () => {
7070
state: 'NY',
7171
postalCode: '10001',
7272
country: 'US',
73-
storeId,
7473
},
7574
});
7675

@@ -83,7 +82,6 @@ describe('Export Job Lifecycle (Integration)', () => {
8382
state: 'NY',
8483
postalCode: '10001',
8584
country: 'US',
86-
storeId,
8785
},
8886
});
8987

@@ -98,12 +96,8 @@ describe('Export Job Lifecycle (Integration)', () => {
9896
shippingAmount: 0,
9997
discountAmount: 0,
10098
totalAmount: 100 + i * 10,
101-
shippingAddress: {
102-
connect: { id: shippingAddr.id },
103-
},
104-
billingAddress: {
105-
connect: { id: billingAddr.id },
106-
},
99+
shippingAddressId: shippingAddr.id,
100+
billingAddressId: billingAddr.id,
107101
},
108102
});
109103
}

tests/unit/services/payments/intent-validator-robustness.test.ts

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ describe('Payment Intent Validator Robustness (T041)', () => {
2727
const store = await db.store.create({
2828
data: {
2929
name: 'Test Store',
30-
domain: 'test-store.example.com',
30+
slug: 'test-store',
31+
email: 'test-store@example.com',
3132
currency: 'USD',
3233
timezone: 'America/New_York',
3334
},
@@ -358,7 +359,19 @@ describe('Payment Intent Validator Robustness (T041)', () => {
358359
email: 'test@example.com',
359360
name: 'Test User',
360361
password: 'hashed',
361-
role: 'Customer',
362+
role: 'CUSTOMER',
363+
},
364+
});
365+
366+
const shippingAddr = await db.address.create({
367+
data: {
368+
firstName: 'Test',
369+
lastName: 'User',
370+
address1: '123 Test St',
371+
city: 'Test City',
372+
state: 'TS',
373+
postalCode: '12345',
374+
country: 'US',
362375
},
363376
});
364377

@@ -368,20 +381,26 @@ describe('Payment Intent Validator Robustness (T041)', () => {
368381
userId,
369382
orderNumber: 'ORD-USED',
370383
status: 'DELIVERED',
371-
total: 1000,
372-
shippingAddress: JSON.stringify({}),
373-
billingAddress: JSON.stringify({}),
384+
subtotal: 1000,
385+
taxAmount: 0,
386+
shippingAmount: 0,
387+
discountAmount: 0,
388+
totalAmount: 1000,
389+
shippingAddressId: shippingAddr.id,
390+
billingAddressId: shippingAddr.id,
374391
},
375392
});
376393

377394
await db.payment.create({
378395
data: {
396+
storeId,
379397
orderId: order.id,
380398
amount: 1000,
381399
currency: 'USD',
382400
status: 'PAID',
383401
gatewayPaymentId: paymentIntentId,
384-
gateway: 'stripe',
402+
gateway: 'STRIPE',
403+
method: 'CREDIT_CARD',
385404
},
386405
});
387406

tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)