Funktionen: Preis entfernt, Abrechnung und Abo-Fehlertext als reine Logik
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dce7c3e53a
commit
8f75276c54
4 files changed
+119
-6
No files matched your search
@@ -144,3 +144,10 @@ test('Fehlercode und Feldmeldungen des Portals bleiben am Fehler (409 ZEITEN_VER
|
||||
assert.equal(ohne.code, undefined)
|
||||
assert.equal(ohne.fehler, undefined)
|
||||
})
|
||||
|
||||
test('Der Grund einer Abo-Sperre bleibt am Fehler (409 abo_fehlt mit grund)', async () => {
|
||||
const { api } = client({ responses: [reply(409, { error: 'x', code: 'abo_fehlt', grund: 'kein_abo' }), reply(409, { error: 'y', code: 'abo_fehlt', grund: 5 })] })
|
||||
const a = await fails(api('/funktionen/c1/news', { method: 'POST', body: {} }))
|
||||
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)
|
||||
})
|
||||
Reference in new issue
Block a user