Portal: Admin-Panel, Rechnungsanalyse und alte Admin-Schnittstellen entfernt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a4fa581c0
commit
7c00633db0
43 files changed
+229
-4001
No files matched your search
@@ -20,7 +20,7 @@ useTestEnv({ appwriteUrl: aw.url, stripeUrl: st.url })
|
||||
process.env.ABO_TEST_EMAILS = 'test@example.invalid'
|
||||
const { config } = await import('../server/config.js')
|
||||
const { startTestApp, get, post, postWebhook } = await import('./support/testApp.js')
|
||||
const { hostingDoc, hosting2Doc, consent, customerCookie, viewAsCookie, seedFixtures, stripeSubscription, subscriptionDoc } =
|
||||
const { hostingDoc, hosting2Doc, consent, customerCookie, kundenansichtCookie, seedFixtures, stripeSubscription, subscriptionDoc } =
|
||||
await import('./support/fixtures.js')
|
||||
const { default: aboRoutes } = await import('../server/routes/abo.js')
|
||||
const { previewSwitch, switchToWartung, markSwitchFailed, previewProblem, paymentMethodTypeOf, reconcilePendingSwitch, SWITCH_FAILED_REASONS } =
|
||||
@@ -590,7 +590,7 @@ test('Route: ohne earlyStart 400', async () => {
|
||||
assert.equal(res.status, 400)
|
||||
})
|
||||
|
||||
test('Routen: fehlende Angaben 400, alte Fassung 409, ohne Session 401, „Als Kunde ansehen“ 403, ohne Stripe-Aufruf', async () => {
|
||||
test('Routen: fehlende Angaben 400, alte Fassung 409, ohne Session 401, Kundenansicht 403, ohne Stripe-Aufruf', async () => {
|
||||
await resetHosting()
|
||||
const cookie = customerCookie()
|
||||
const body = { acceptTerms: true, earlyStart: true, termsVersion: config.abo.termsVersion, prorationDate: nowUnix(), amountDueCents: 4100 }
|
||||
@@ -607,8 +607,8 @@ test('Routen: fehlende Angaben 400, alte Fassung 409, ohne Session 401, „Als K
|
||||
assert.match(stale.body.error, /Bedingungen/)
|
||||
assert.equal((await post('/api/abo/switch', body)).status, 401)
|
||||
assert.equal((await post('/api/abo/switch/preview', {})).status, 401)
|
||||
assert.equal((await post('/api/abo/switch', body, { cookie: viewAsCookie() })).status, 403)
|
||||
assert.equal((await post('/api/abo/switch/preview', {}, { cookie: viewAsCookie() })).status, 403)
|
||||
assert.equal((await post('/api/abo/switch', body, { cookie: kundenansichtCookie() })).status, 403)
|
||||
assert.equal((await post('/api/abo/switch/preview', {}, { cookie: kundenansichtCookie() })).status, 403)
|
||||
assert.equal(st.calls.length, before)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user