Skip to content

Commit

Permalink
[cleanup] feat: Delete user cleanup api
Browse files Browse the repository at this point in the history
  • Loading branch information
helloitsdave committed May 18, 2024
1 parent e9893da commit f0e5514
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backend/tests/service/users.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ describe('Authenticated Flows', () => {
});

test('Delete a User', async () => {
const newUserLogin = await request(BASE_URL).post('/api/login').send({
password,
username,
});
expect(newUserLogin.status).toBe(200);
expect(newUserLogin.body.token).toBeDefined();
// Set Token for future requests
token = newUserLogin.body.token;

const response = await request(USERS_URL)
.delete('/')
.set('Authorization', `Bearer ${token}`);
Expand Down

0 comments on commit f0e5514

Please sign in to comment.