Tests: Add index endpoint blacklist test (#3130)

This commit is contained in:
Alexandr Garbuzov 2023-08-23 10:58:21 +03:00 committed by GitHub
parent 4cf33ad1bf
commit 988044a199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -276,4 +276,13 @@ describe("Test /api/", () => {
}),
);
});
it("should render error card if username in blacklist", async () => {
const { req, res } = faker({ username: "renovate-bot" }, data_stats);
await api(req, res);
expect(res.setHeader).toBeCalledWith("Content-Type", "image/svg+xml");
expect(res.send).toBeCalledWith(renderError("Something went wrong"));
});
});