Hosting-Abo: Preis 15 € -> 20 € pro Monat (Vertragsbedingungen v4, Katalog, Leitfaden)
- server/config.js: amountCents 2000, lookup_key webklar_hosting_monatlich_2000 - ensurePrice haengt einen neuen Preis an das vorhandene Stripe-Produkt (metadata.webklar), statt ein zweites "WEBklar Hosting-Abo" anzulegen - abo-bedingungen.html (Uebersicht, Preise, Leistungsbeschreibung) + PDF, Leitfaden + PDF - Tests auf 20 € umgestellt (399/399) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
78b4d7b7fe
commit
e4efdac226
18 files changed
+79
-59
No files matched your search
@@ -5,8 +5,8 @@ import assert from 'node:assert/strict'
|
||||
// Die Pruefung vergleicht den Monatsbetrag beim bisherigen Anbieter mit der Monatsgebuehr des Abos des Kunden.
|
||||
const { runAutoChecks } = await import('../server/services/takeoverCredits.js')
|
||||
|
||||
// 240 € fuer 12 Monate = 20,00 € pro Monat: mehr als das Hosting-Abo (15,00 €), weniger als das Wartungs-Abo (50,00 €)
|
||||
const doc = { $id: 'req1', $createdAt: '2026-10-01T10:00:00.000Z', domain: '', invoiceAmountCents: 24000, billingMonths: 12, files: '[]' }
|
||||
// 300 € fuer 12 Monate = 25,00 € pro Monat: mehr als das Hosting-Abo (20,00 €), weniger als das Wartungs-Abo (50,00 €)
|
||||
const doc = { $id: 'req1', $createdAt: '2026-10-01T10:00:00.000Z', domain: '', invoiceAmountCents: 30000, billingMonths: 12, files: '[]' }
|
||||
const sub = (productKey) => ({
|
||||
status: 'active',
|
||||
startedAt: '2026-10-01T00:00:00.000Z',
|
||||
@@ -16,15 +16,15 @@ const sub = (productKey) => ({
|
||||
const amountCheck = async (subscription) =>
|
||||
(await runAutoChecks(doc, { allRequests: [], subscription, calc: null })).find((c) => c.key === 'amount')
|
||||
|
||||
test('Plausibilität: 20 € pro Monat ist mehr als das Hosting-Abo (15,00 €)', async () => {
|
||||
test('Plausibilität: 25 € pro Monat ist mehr als das Hosting-Abo (20,00 €)', async () => {
|
||||
const hosting = await amountCheck(sub('hosting'))
|
||||
assert.ok(hosting, 'Hinweis „mehr als die Monatsgebühr“ fehlt beim Hosting-Abo')
|
||||
assert.equal(hosting.status, 'info')
|
||||
assert.ok(hosting.label.includes('15,00'), hosting.label)
|
||||
assert.ok(hosting.label.includes('20,00'), hosting.label)
|
||||
assert.ok(hosting.label.includes('25,00'), hosting.label)
|
||||
})
|
||||
|
||||
test('Plausibilität: 20 € pro Monat ist nicht mehr als das Wartungs-Abo (50,00 €)', async () => {
|
||||
test('Plausibilität: 25 € pro Monat ist nicht mehr als das Wartungs-Abo (50,00 €)', async () => {
|
||||
assert.equal(await amountCheck(sub('wartung')), undefined)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user