fix: return empty ticket list when no tickets found

This commit is contained in:
Meik
2026-07-01 14:20:08 +02:00
parent 6cb9e3b5fd
commit bdab9f37ba
4 changed files with 7 additions and 7 deletions

View File

@@ -327,11 +327,11 @@
"script": {
"type": "text/javascript",
"exec": [
"pm.test(\"Ticket list is array or null\", function () {",
"pm.test(\"Ticket list is an array\", function () {",
" const text = pm.response.text();",
" if (!text) return;",
" pm.expect(text).to.not.equal(\"\");",
" const json = pm.response.json();",
" pm.expect(json === null || Array.isArray(json)).to.equal(true);",
" pm.expect(Array.isArray(json)).to.equal(true);",
"});",
"",
"const tickets = pm.response.text() ? pm.response.json() : null;",