mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 11:22:40 +00:00
fix tests 2
This commit is contained in:
@@ -41,8 +41,8 @@ describe('Tests for admin api', ()=>{
|
|||||||
...inputNotification,
|
...inputNotification,
|
||||||
_id : expect.any(String), // Don't care what _id is, just that it added one
|
_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
|
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
|
startAt : inputNotification.startAt, // Convert to json to match the format coming from mongo
|
||||||
stopAt : inputNotification.stopAt.toJSON()
|
stopAt : inputNotification.stopAt,
|
||||||
};
|
};
|
||||||
|
|
||||||
//Change 'save' function to just return itself instead of actually interacting with the database
|
//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')}`);
|
.set('Authorization', `Basic ${Buffer.from('admin:password3').toString('base64')}`);
|
||||||
|
|
||||||
expect(response.status).toBe(200);
|
expect(response.status).toBe(200);
|
||||||
expect(response.body).toEqual({ message: 'Notification deleted successfully' });
|
expect(response.body).toEqual({ success: true, message: 'Notification deleted successfully' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user