auto(agent): add profile test
This commit is contained in:
parent
07a4998b1f
commit
b1efaffe3e
1 changed files with 13 additions and 0 deletions
13
backend/src/__tests__/profile.test.js
Normal file
13
backend/src/__tests__/profile.test.js
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
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');
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue