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
@@ -42,9 +42,9 @@ const ADMIN = { name: 'Admin', email: 'admin@example.invalid' }
|
||||
// Step 1 (Brief): validateOfferInput + getOpenOffer
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
test('Angebot Hosting: Normalpreis 15 €, Preis darunter', () => {
|
||||
assert.equal(validateOfferInput({ productKey: 'hosting', months: 2, monthlyPriceCents: 1000 }).regularPriceCents, 1500)
|
||||
assert.throws(() => validateOfferInput({ productKey: 'hosting', months: 2, monthlyPriceCents: 1500 }), (e) => e.status === 400)
|
||||
test('Angebot Hosting: Normalpreis 20 €, Preis darunter', () => {
|
||||
assert.equal(validateOfferInput({ productKey: 'hosting', months: 2, monthlyPriceCents: 1000 }).regularPriceCents, 2000)
|
||||
assert.throws(() => validateOfferInput({ productKey: 'hosting', months: 2, monthlyPriceCents: 2000 }), (e) => e.status === 400)
|
||||
assert.throws(() => validateOfferInput({ months: 2, monthlyPriceCents: 1000 }), (e) => e.status === 400)
|
||||
})
|
||||
|
||||
@@ -69,7 +69,7 @@ test('createOffer: offene Angebote fuer Hosting und Wartung koennen nebeneinande
|
||||
const hosting = await createOffer({ customerId: 'c3', productKey: 'hosting', months: 2, monthlyPriceCents: 1000, notifyCustomer: false }, ADMIN)
|
||||
try {
|
||||
assert.equal(hosting.doc.productKey, 'hosting')
|
||||
assert.equal(hosting.doc.regularPriceCents, 1500)
|
||||
assert.equal(hosting.doc.regularPriceCents, 2000)
|
||||
assert.equal(hosting.doc.status, 'offen')
|
||||
|
||||
await assert.rejects(
|
||||
@@ -118,7 +118,7 @@ test('createOffer: nur bei passendem Produkt wird das Angebot sofort aufs laufen
|
||||
|
||||
test('offerContext: products mit Normalpreisen, subscription.productKey, offene Angebote je Produkt', async () => {
|
||||
const withoutSub = await offerContext('c3')
|
||||
assert.deepEqual(withoutSub.products, { hosting: { regularPriceCents: 1500 }, wartung: { regularPriceCents: 5000 } })
|
||||
assert.deepEqual(withoutSub.products, { hosting: { regularPriceCents: 2000 }, wartung: { regularPriceCents: 5000 } })
|
||||
assert.equal(withoutSub.subscription, null)
|
||||
assert.deepEqual(withoutSub.openOffers, { hosting: null, wartung: null })
|
||||
|
||||
|
||||
Reference in new issue
Block a user