imageFilenames and imageFilename, backend integration tests, frontend tests, removed username references

This commit is contained in:
jackiettran
2025-11-26 23:13:23 -05:00
parent f2d3aac029
commit 11593606aa
52 changed files with 2815 additions and 150 deletions

View File

@@ -63,7 +63,7 @@ describe('Messages Routes', () => {
id: 2,
firstName: 'Jane',
lastName: 'Smith',
profileImage: 'jane.jpg'
imageFilename: 'jane.jpg'
}
},
{
@@ -77,7 +77,7 @@ describe('Messages Routes', () => {
id: 3,
firstName: 'Bob',
lastName: 'Johnson',
profileImage: null
imageFilename: null
}
}
];
@@ -95,7 +95,7 @@ describe('Messages Routes', () => {
{
model: User,
as: 'sender',
attributes: ['id', 'firstName', 'lastName', 'profileImage']
attributes: ['id', 'firstName', 'lastName', 'imageFilename']
}
],
order: [['createdAt', 'DESC']]
@@ -127,7 +127,7 @@ describe('Messages Routes', () => {
id: 2,
firstName: 'Jane',
lastName: 'Smith',
profileImage: 'jane.jpg'
imageFilename: 'jane.jpg'
}
}
];
@@ -145,7 +145,7 @@ describe('Messages Routes', () => {
{
model: User,
as: 'receiver',
attributes: ['id', 'firstName', 'lastName', 'profileImage']
attributes: ['id', 'firstName', 'lastName', 'imageFilename']
}
],
order: [['createdAt', 'DESC']]
@@ -175,13 +175,13 @@ describe('Messages Routes', () => {
id: 2,
firstName: 'Jane',
lastName: 'Smith',
profileImage: 'jane.jpg'
imageFilename: 'jane.jpg'
},
receiver: {
id: 1,
firstName: 'John',
lastName: 'Doe',
profileImage: 'john.jpg'
imageFilename: 'john.jpg'
},
update: jest.fn()
};
@@ -208,13 +208,13 @@ describe('Messages Routes', () => {
id: 2,
firstName: 'Jane',
lastName: 'Smith',
profileImage: 'jane.jpg'
imageFilename: 'jane.jpg'
},
receiver: {
id: 1,
firstName: 'John',
lastName: 'Doe',
profileImage: 'john.jpg'
imageFilename: 'john.jpg'
}
});
expect(mockMessage.update).toHaveBeenCalledWith({ isRead: true });
@@ -239,13 +239,13 @@ describe('Messages Routes', () => {
id: 2,
firstName: 'Jane',
lastName: 'Smith',
profileImage: 'jane.jpg'
imageFilename: 'jane.jpg'
},
receiver: {
id: 1,
firstName: 'John',
lastName: 'Doe',
profileImage: 'john.jpg'
imageFilename: 'john.jpg'
}
});
expect(mockMessage.update).not.toHaveBeenCalled();
@@ -304,7 +304,7 @@ describe('Messages Routes', () => {
id: 1,
firstName: 'John',
lastName: 'Doe',
profileImage: 'john.jpg'
imageFilename: 'john.jpg'
}
};
@@ -330,7 +330,7 @@ describe('Messages Routes', () => {
senderId: 1,
receiverId: 2,
content: 'Hello Jane!',
imagePath: null
imageFilename: null
});
});