@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 615feda
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 01:45 UTC

test: require versioned CAS for generic upserts and deletes

davoodmehraban89 committed Nov 17, 2026 at 14:29 UTC 615feda2e84350e3a24dda558b6cef9ddbaee9f9
1 file changed +6
scripts/journal-rpc-adapter.test.mjs
+6
@@ -270,6 +270,12 @@ test('sync hydration reads database row version required by journal CAS operatio
270 assert.match(syncSource,/select\('collection,id,data,version'\)/);
271 assert.match(syncSource,/obj\._serverVersion=Number\(r\.version\)/);
272 assert.match(syncSource,/p_organization_id:currentUser\.organizationId\|\|null/);
273 + assert.match(syncSource,/sb\.rpc\('finora_sync_records_v2'/);
274 + assert.match(syncSource,/expected_version:r\.expectedVersion/);
275 + assert.match(syncSource,/expected_version:version/);
276 + assert.match(syncSource,/syncVersionSnap\.set\(r\.key,version\)/);
277 + assert.match(syncSource,/code==='40001'/);
278 + assert.doesNotMatch(syncSource,/sb\.rpc\('finora_sync_records',/);
279 assert.match(syncSource,/delete c\.accountingPostingPending/);
280 });
281