Tighten fetch assertion in change password test

Replace a broad fetch mock expectation with a more specific one to ensure the test only asserts that the change-password endpoint was not called. This avoids false failures when other fetch calls occur by checking not.toHaveBeenCalledWith('/api/auth/change-password', expect.anything()).
This commit is contained in:
kikootwo
2026-02-10 22:12:06 -05:00
parent bceb13f4dd
commit b013538b63
@@ -48,7 +48,10 @@ describe('ChangePasswordModal', () => {
expect(screen.getByText('Not authenticated')).toBeInTheDocument();
});
expect(fetchMock).not.toHaveBeenCalled();
expect(fetchMock).not.toHaveBeenCalledWith(
'/api/auth/change-password',
expect.anything()
);
});
it('submits successfully and auto-closes after showing success', async () => {