Skip to content

Commit 90cac74

Browse files
committed
fix: update customers test to match correct retrieveByEmail endpoint
- Fix failing test for retrieveByEmail method - Update test expectation to use /customers/by_email/:email endpoint - Aligns test with actual implementation using by_email path
1 parent e4aa89a commit 90cac74

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/resources/customers.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,14 @@ describe('CustomersResource', () => {
106106
});
107107

108108
describe('retrieveByEmail', () => {
109-
it('should send GET request to /customers/email with email parameter', async () => {
109+
it('should send GET request to /customers/by_email/:email endpoint', async () => {
110110
const email = '[email protected]';
111111

112112
await magpie.customers.retrieveByEmail(email);
113113

114114
expect(magpie.LAST_REQUEST).toMatchObject({
115115
method: 'GET',
116-
url: expect.stringContaining('/customers/email'),
117-
params: { email }
116+
url: expect.stringContaining('/customers/by_email/[email protected]')
118117
});
119118
});
120119
});

0 commit comments

Comments
 (0)