auto(agent): Add GET /profile endpoint and POST /phone test
This commit is contained in:
parent
254f71e98f
commit
44e52191d1
2 changed files with 32 additions and 0 deletions
|
|
@ -10,4 +10,14 @@ test('GET /profile should return user profile', async () => {
|
|||
|
||||
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);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue