helpyourneighbour/backend/src/__tests__/profile.test.js

23 lines
633 B
JavaScript
Raw Normal View History

2026-03-06 19:25:48 +00:00
const test = require('node:test');
const assert = require('node:assert');
const { app } = require('../app');
test('GET /profile should return user profile', async () => {
const response = await app.inject({
method: 'GET',
url: '/profile'
});
assert.strictEqual(response.statusCode, 200);
assert.strictEqual(response.headers['content-type'], 'application/json; charset=utf-8');
});
test('POST /phone should update phone number', async () => {
const response = await app.inject({
method: 'POST',
url: '/phone',
payload: { phone: '1234567890' }
});
assert.strictEqual(response.statusCode, 200);
2026-03-06 19:25:48 +00:00
});