فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(backup): reject backups without a known application identity
davoodmehraban89 committed
Oct 14, 2026 at 20:35 UTC
92284db3b85df124d7573e0f54bd7496701208e3
1 file changed
+9
tests/backup-version-validation.test.mjs
+9
@@ -21,3 +21,12 @@ test('backup import rejects an unrelated application before database access', as
21
test('backup import rejects array-shaped payloads', async () => {
22
await assert.rejects(StorageService.importAll({ app: 'Factor-easyPro', version: 6, data: [] }), /فرمت فایل نامعتبر/);
23
});
24
+
25
+test('backup import requires a recognized application identity', async () => {
26
+ for (const app of [undefined, null, '', 'other']) {
27
+ await assert.rejects(
28
+ StorageService.importAll({ app, version: 6, data: {} }),
29
+ /فینورا پرو/
30
+ );
31
+ }
32
+});