Календарь: напоминания личными уведомлениями и тёмная тема
This commit is contained in:
+2
-1
@@ -114,13 +114,14 @@ ok('entries.purge_at больше не теряется', e.entries[0].purge_at
|
||||
|
||||
const nt = normalizeRestoreData({
|
||||
...base,
|
||||
notifications: [{ id: 5, type: 'entry.new', level: 'warning', title: 'T', body: 'B', link: 'l', target: { a: 1 }, admin_only: true, branch_id: 2 }],
|
||||
notifications: [{ id: 5, type: 'entry.new', level: 'warning', title: 'T', body: 'B', link: 'l', target: { a: 1 }, admin_only: true, branch_id: 2, user_id: 3 }],
|
||||
notification_reads: [{ user_id: 1, notification_id: 5 }],
|
||||
audit_log: [{ id: 7, user_id: 1, action: 'backup.download', target: { size: 5 }, ip: '1.2.3.4' }],
|
||||
banned_ips: [{ ip: '203.0.113.7', reason: 'manual', banned_until: '2026-05-05T00:00:00.000Z' }],
|
||||
});
|
||||
ok('notifications нормализуются', nt.notifications[0].level === 'warning' && nt.notifications[0].title === 'T', nt.notifications[0]);
|
||||
ok('notifications.target остаётся JSON-строкой', nt.notifications[0].target === '{"a":1}', nt.notifications[0].target);
|
||||
ok('notifications.user_id сохраняется', nt.notifications[0].user_id === 3, nt.notifications[0].user_id);
|
||||
ok('notification_reads нормализуются', nt.notification_reads[0].notification_id === 5);
|
||||
ok('audit_log нормализуется', nt.audit_log[0].action === 'backup.download' && nt.audit_log[0].target === '{"size":5}', nt.audit_log[0]);
|
||||
ok('banned_ips нормализуются', nt.banned_ips[0].ip === '203.0.113.7');
|
||||
|
||||
Reference in New Issue
Block a user