Skip to content

Commit 08b680c

Browse files
committed
fix: test data payload
1 parent 10d2d53 commit 08b680c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/billing_flow.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('HMS Billing Flow Integration', () => {
6868
});
6969

7070
expect([200, 201]).toContain(res.statusCode);
71-
billId = res.body.data?._id || res.body._id;
71+
billId = res.body._id;
7272
expect(billId).toBeDefined();
7373
});
7474

@@ -91,7 +91,7 @@ describe('HMS Billing Flow Integration', () => {
9191
});
9292

9393
expect(res.statusCode).toBe(200);
94-
const updatedBill = res.body.data || res.body;
94+
const updatedBill = res.body;
9595
expect(updatedBill.status).toBe('paid');
9696
});
9797
});

tests/patient.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('Patient Integration Tests', () => {
6060
});
6161

6262
expect(res.statusCode).toBe(201);
63-
expect(res.body.data._id).toBeDefined();
63+
expect(res.body._id).toBeDefined();
6464
});
6565

6666
it('should fail if missing required patient details', async () => {

tests/patient_flow.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('HMS Patient Flow Integration', () => {
5555

5656
expect(res.statusCode).toBe(201);
5757
expect(res.body._id).toBeDefined();
58-
patientId = res.body.data._id;
58+
patientId = res.body._id;
5959
});
6060

6161
it('2. Should fetch patient by ID (Verifying the 404 fix)', async () => {

0 commit comments

Comments
 (0)