test: spell out the device policy defaults, since the offline caps are numbers where 0 means no cap

This commit is contained in:
Linus Rath
2026-11-03 19:49:55 +01:00
parent 5467f5db93
commit fe3c213cb9
@@ -21,7 +21,13 @@ describe('enterprise sections: defaults and sanitising', () => {
expect(org.phishingReport).toEqual({ address: '', format: 'forward' });
expect(org.labels).toEqual({ list: [], defaultId: '', required: false, extraHeader: '' });
expect(org.announcement.text).toEqual({});
expect(Object.values(org.devices).every((v) => v === false)).toBe(true);
// The caps are numbers, and 0 is no cap. Spelled out, so a new key has to say its default.
expect(org.devices).toEqual({
noDownloads: false, noExport: false, noPrint: false, noInstallPrompt: false,
pushWithoutContent: false, watermark: false, noOffline: false,
offlineMaxDays: 0, noOfflineAttachments: false, offlineMaxAttachmentMb: 0, offlineMaxTotalMb: 0,
wipeOnForcedSignOut: false,
});
expect(org.calendars).toEqual({ feeds: [], freeBusyGroup: '' });
expect(org.retention).toEqual({ trashDays: 0, junkDays: 0 });
});