users: add unset route for avatar
also add missing tests for avatar and profile locking
This commit is contained in:
@@ -328,6 +328,18 @@ describe('Profile API', function () {
|
||||
expect(parseInt(response.headers['content-length'])).to.equal(customAvatarSize);
|
||||
expect(response.status).to.equal(200);
|
||||
});
|
||||
|
||||
it('can unset custom avatar', async function () {
|
||||
const response = await superagent.del(`${serverUrl}/api/v1/profile/avatar`)
|
||||
.query({ access_token: user.token });
|
||||
|
||||
expect(response.status).to.be(204);
|
||||
});
|
||||
|
||||
it('did unset custom avatar', async function () {
|
||||
const response = await superagent.get(`${serverUrl}/api/v1/profile/avatar/${user.id}`).ok(() => true);
|
||||
expect(response.status).to.be(404);
|
||||
});
|
||||
});
|
||||
|
||||
describe('background', function () {
|
||||
|
||||
Reference in New Issue
Block a user