style: #6556 set default user image, set users image #2168

Merged
jon merged 11 commits from 6556-ChangeImages into dev 2024-03-26 06:35:12 +00:00
1 changed files with 11 additions and 2 deletions
Showing only changes of commit 67c572f187 - Show all commits

View File

@ -4,13 +4,22 @@ describe('image download()', () => {
const collection = 'user';
const size = '160x160';
const employeeId = 1;
const developerId = 9;
const jessicaJonesId = 1110;
const ctx = {req: {accessToken: {userId: employeeId}}};
it('should return the image content-type of the user', async() => {
const userId = 9;
const image = await models.Image.download(ctx, collection, size, userId);
const image = await models.Image.download(ctx, collection, size, developerId);
const contentType = image[1];
expect(contentType).toEqual('image/png');
});
// TEST RETURNS TRUE IF USER IMAGE ID MATCHES WITH THE DOWNLOAD IMAGE NAME
jon marked this conversation as resolved
Review

estos comentarios no son necesarios porque la explicacion ya esta en el it

estos comentarios no son necesarios porque la explicacion ya esta en el it
it('should return the user profile picture', async() => {
const image = await models.Image.download(ctx, collection, size, jessicaJonesId);
const fileName = image[2];
expect(fileName).toMatch('1110.png');
});
});