fix(housekeeping): address task 14 review round 3
This commit is contained in:
1 parent
c524b305d7
commit
d1160eb65a
7 files changed
+243
-40
No files matched your search
@@ -265,6 +265,45 @@ describe("Content legacy wrappers", () => {
|
||||
expect(auditedBrandExecute).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("maps a favicon audit partial to the truthful legacy result shape", async () => {
|
||||
auditedBrandExecute.mockResolvedValueOnce({
|
||||
before: { value: "/old.ico" },
|
||||
after: { value: "/api/media/favicon/new.ico" },
|
||||
output: { url: "/api/media/favicon/new.ico" },
|
||||
completion: {
|
||||
status: "partial",
|
||||
external: "completed",
|
||||
audit: "unavailable",
|
||||
},
|
||||
});
|
||||
const file = new File(["bytes"], "favicon.png", { type: "image/png" });
|
||||
await expect(saveFavicon(form({ file }) as FormData)).resolves.toEqual({
|
||||
success: false,
|
||||
url: "/api/media/favicon/new.ico",
|
||||
error:
|
||||
"Favicon change completed partially; verify storage and audit state",
|
||||
});
|
||||
});
|
||||
|
||||
it("maps a logo audit partial to the truthful legacy result shape", async () => {
|
||||
auditedBrandExecute.mockResolvedValueOnce({
|
||||
before: { value: "/old.png" },
|
||||
after: { value: "/api/media/logo/new.png" },
|
||||
output: { url: "/api/media/logo/new.png" },
|
||||
completion: {
|
||||
status: "partial",
|
||||
external: "completed",
|
||||
audit: "unavailable",
|
||||
},
|
||||
});
|
||||
const file = new File(["bytes"], "logo.png", { type: "image/png" });
|
||||
await expect(saveLogo(form({ file }) as FormData)).resolves.toEqual({
|
||||
success: false,
|
||||
url: "/api/media/logo/new.png",
|
||||
error: "Logo change completed partially; verify storage and audit state",
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps every listed legacy action as a thin shared-service wrapper", () => {
|
||||
for (const path of [
|
||||
"src/actions/admin-ads.ts",
|
||||
|
||||
Reference in new issue
Block a user