Files
Skrift-Kofnigurator/Docker Backend/bruno-tests/2 Preview Batch - Single Letter.bru
2026-02-07 13:04:04 +01:00

52 lines
1.1 KiB
Plaintext

meta {
name: 2 Preview Batch - Single Letter
type: http
seq: 2
}
post {
url: {{baseUrl}}/api/preview/batch
body: json
auth: none
}
body:json {
{
"sessionId": "{{sessionId}}",
"batchIndex": 0,
"forceRegenerate": false,
"config": {
"font": "tilda",
"letters": [
{
"index": 0,
"format": "a4",
"text": "Hallo [[Vorname]] [[Nachname]],\n\ndein persönlicher Gutscheincode lautet: [[Gutscheincode]]\n\nEr ist gültig bis zum [[Ablaufdatum]].\n\nViele Grüße,\nDein Skrift-Team",
"placeholders": {
"Vorname": "Max",
"Nachname": "Mustermann",
"Gutscheincode": "SAVE20",
"Ablaufdatum": "31.12.2026"
}
}
],
"envelopes": []
}
}
}
tests {
test("Status is 200", function() {
expect(res.status).to.equal(200);
});
test("Returns session ID", function() {
expect(res.body.sessionId).to.be.a("string");
});
test("Returns files array", function() {
expect(res.body.files).to.be.an("array");
expect(res.body.files.length).to.be.greaterThan(0);
});
}