Funktionen: Warnung der Aufbauphase, Abo-Beginn mit Datum, Texte für abgeschaltet und bereits eingeschaltet

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-10-16 17:05:46 +00:00
1 parent 06166221ec
commit 1742fb254d
4 files changed
+116 -10

No files matched your search

+14
View File
@@ -151,3 +151,17 @@ test('Der Grund einer Abo-Sperre bleibt am Fehler (409 abo_fehlt mit grund)', as
assert.deepEqual([a.status, a.code, a.grund], [409, 'abo_fehlt', 'kein_abo'])
assert.equal((await fails(api('/funktionen/c1/news', { method: 'POST', body: {} }))).grund, undefined)
})
test('Das Datum eines späteren Abo-Beginns bleibt am Fehler (409 abo_fehlt, beginnt_spaeter mit ab)', async () => {
const { api } = client({
responses: [
reply(409, { error: 'x', code: 'abo_fehlt', grund: 'beginnt_spaeter', ab: '2026-11-03T08:00:00.000Z' }),
reply(409, { error: 'y', code: 'abo_fehlt', grund: 'beginnt_spaeter', ab: 5 }),
reply(409, { error: 'z', code: 'abo_fehlt', grund: 'beginnt_spaeter' }),
],
})
const a = await fails(api('/funktionen/c6/news', { method: 'POST', body: {} }))
assert.deepEqual([a.status, a.code, a.grund, a.ab], [409, 'abo_fehlt', 'beginnt_spaeter', '2026-11-03T08:00:00.000Z'])
assert.equal((await fails(api('/funktionen/c6/news', { method: 'POST', body: {} }))).ab, undefined) // kein Text
assert.equal((await fails(api('/funktionen/c6/news', { method: 'POST', body: {} }))).ab, undefined) // fehlt
})