Finanzen: Collections und Setup-Skript mit Sitzungsuebernahme
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9329318df5
commit
3dd2fac50b
4 files changed
+323
-8
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { test } from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { schemaKeys } from './support/schema.js'
|
||||
|
||||
test('bankTransactions: Attribute der Spec sind im Setup-Skript angelegt', () => {
|
||||
const keys = schemaKeys('bankTransactions')
|
||||
for (const key of ['amountCents', 'category', 'matchedInvoiceId', 'entryReference', 'bookingDate', 'syncedAt']) {
|
||||
assert.ok(keys.includes(key), `${key} fehlt`)
|
||||
}
|
||||
})
|
||||
|
||||
test('bankConnections: Status und Warnstufen', () => {
|
||||
const keys = schemaKeys('bankConnections')
|
||||
for (const key of ['status', 'sessionId', 'accountUid', 'validUntil', 'warnedThresholds', 'balanceBookedCents']) {
|
||||
assert.ok(keys.includes(key), `${key} fehlt`)
|
||||
}
|
||||
})
|
||||
|
||||
test('financeSettings und financeFixedCosts sind angelegt', () => {
|
||||
assert.ok(schemaKeys('financeSettings').includes('taxReservePercent'))
|
||||
assert.ok(schemaKeys('financeFixedCosts').includes('counterpartyMatch'))
|
||||
})
|
||||
|
||||
test('subscriptions wird weiter aus dem Abo-Setup gelesen', () => {
|
||||
assert.ok(schemaKeys('subscriptions').includes('stripeSubscriptionId'))
|
||||
})
|
||||
|
||||
test('unbekannte Collection scheitert mit klarer Meldung', () => {
|
||||
assert.throws(() => schemaKeys('gibtEsNicht'), /Collection gibtEsNicht fehlt im Setup-Skript/)
|
||||
})
|
||||
Reference in new issue
Block a user