feat(legal): integrate RheinLand Betriebshaftpflichtversicherung
This commit is contained in:
26
tests/certificates.test.ts
Normal file
26
tests/certificates.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import fs from 'fs';
|
||||
import { defaultCertificates } from '../components/blocks/CertificatesBlock';
|
||||
|
||||
describe('Certificates & Insurance Integration (DE + EN)', () => {
|
||||
it('includes the new RheinLand Betriebshaftpflichtversicherung in defaultCertificates (DE)', () => {
|
||||
const haftpflichtCert = defaultCertificates.find(
|
||||
(cert) => cert.title === 'Betriebshaftpflichtversicherung'
|
||||
);
|
||||
expect(haftpflichtCert).toBeDefined();
|
||||
expect(haftpflichtCert?.pdfUrl).toBe('/assets/certificates/betriebshaftpflicht.pdf');
|
||||
expect(haftpflichtCert?.date).toBe('25.03.2026');
|
||||
});
|
||||
|
||||
it('verifies that content/en/zertifikate.mdx includes Commercial Liability Insurance (EN)', () => {
|
||||
const enMdx = fs.readFileSync('/Volumes/Alpha SSD/Coding/e-tib.com/content/en/zertifikate.mdx', 'utf-8');
|
||||
expect(enMdx).toContain("title: 'Commercial Liability Insurance'");
|
||||
expect(enMdx).toContain("pdfUrl: '/assets/certificates/betriebshaftpflicht.pdf'");
|
||||
expect(enMdx).toContain("date: '25.03.2026'");
|
||||
});
|
||||
|
||||
it('verifies that the PDF asset exists in public/assets/certificates/betriebshaftpflicht.pdf', () => {
|
||||
const filePath = '/Volumes/Alpha SSD/Coding/e-tib.com/public/assets/certificates/betriebshaftpflicht.pdf';
|
||||
expect(fs.existsSync(filePath)).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user