fix: correct corrupted-image test expectations and SVGZ watermark filename

Tests expected 422 for corrupted image data, but the API correctly
returns 400 since corruption is caught during validation (unrecognized
format), not during processing. Also fix watermark-image route passing
a hardcoded "watermark" string instead of the actual uploaded filename
to validateImageBuffer, which broke SVGZ detection.
This commit is contained in:
SnapOtter
2026-05-14 10:47:46 +08:00
parent bc0cac42e3
commit 98531db7ed
4 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ describe("Error handling", () => {
authorization: `Bearer ${adminToken}`,
},
});
expect(res.statusCode).toBe(422);
expect(res.statusCode).toBe(400);
});
});