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

fix test errors

This commit is contained in:
Víctor Losada Hernández
2024-10-03 09:08:24 +02:00
parent 6adac74f76
commit a82e9758b3
2 changed files with 5 additions and 4 deletions

View File

@@ -31,10 +31,11 @@ describe('Tests for admin api', ()=>{
const inputNotification = {
title : 'Test Notification',
text : 'This is a test notification',
startAt : new Date(),
stopAt : new Date(),
startAt : new Date().toISOString(),
stopAt : new Date().toISOString(),
dismissKey : 'testKey'
};
};
const savedNotification = {
...inputNotification,

View File

@@ -43,7 +43,7 @@ NotificationSchema.statics.deleteNotification = async function(dismissKey) {
if(!deletedNotification) {
return { success: false, message: 'Notification not found' };
}
return { success: true, notification: deletedNotification };
return { success: true, message: 'Notification deleted successfully' }; // Update response here
} catch (err) {
return { success: false, message: err.message || 'Error deleting notification' };
}