0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 12:02:48 +00:00

fix tests 2

This commit is contained in:
Víctor Losada Hernández
2024-10-03 09:15:08 +02:00
parent a82e9758b3
commit 5eb1456915

View File

@@ -41,8 +41,8 @@ describe('Tests for admin api', ()=>{
...inputNotification,
_id : expect.any(String), // Don't care what _id is, just that it added one
createdAt : expect.any(String), // Don't care what date is, just that it added it
startAt : inputNotification.startAt.toJSON(), // Convert to json to match the format coming from mongo
stopAt : inputNotification.stopAt.toJSON()
startAt : inputNotification.startAt, // Convert to json to match the format coming from mongo
stopAt : inputNotification.stopAt,
};
//Change 'save' function to just return itself instead of actually interacting with the database
@@ -75,7 +75,7 @@ describe('Tests for admin api', ()=>{
.set('Authorization', `Basic ${Buffer.from('admin:password3').toString('base64')}`);
expect(response.status).toBe(200);
expect(response.body).toEqual({ message: 'Notification deleted successfully' });
expect(response.body).toEqual({ success: true, message: 'Notification deleted successfully' });
});