Update 17 E2E test files including admin, auth, inquiries, listings, payments, search, subscriptions, and MCP specs. Update listings fixture and global setup to align with latest schema changes. Co-Authored-By: Paperclip <noreply@paperclip.ing>
23 lines
708 B
TypeScript
23 lines
708 B
TypeScript
import { test, expect } from '../fixtures';
|
|
|
|
test.describe('POST /auth/refresh', () => {
|
|
test('refreshes tokens with valid refresh token', async ({ request, testTokens }) => {
|
|
const res = await request.post('auth/refresh', {
|
|
data: { refreshToken: testTokens.refreshToken },
|
|
});
|
|
|
|
expect([200, 201]).toContain(res.status());
|
|
const body = await res.json();
|
|
expect(body).toHaveProperty('accessToken');
|
|
expect(body).toHaveProperty('refreshToken');
|
|
});
|
|
|
|
test('rejects invalid refresh token', async ({ request }) => {
|
|
const res = await request.post('auth/refresh', {
|
|
data: { refreshToken: 'invalid-refresh-token' },
|
|
});
|
|
|
|
expect(res.ok()).toBeFalsy();
|
|
});
|
|
});
|