test: preserve auth worker boundary
This commit is contained in:
@@ -36,6 +36,11 @@ describe("cfw-auth worker", () => {
|
|||||||
expect(response.status).toBe(404);
|
expect(response.status).toBe(404);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("does not expose a custom Autumn sync endpoint", async () => {
|
||||||
|
const response = await worker.fetch(new Request("http://auth.local/internal/autumn/sync"), env);
|
||||||
|
expect(response.status).toBe(404);
|
||||||
|
});
|
||||||
|
|
||||||
it("exposes Better Auth OpenAPI reference", async () => {
|
it("exposes Better Auth OpenAPI reference", async () => {
|
||||||
const response = await worker.fetch(new Request("http://auth.local/api/auth/reference"), env);
|
const response = await worker.fetch(new Request("http://auth.local/api/auth/reference"), env);
|
||||||
expect(response.status).toBe(200);
|
expect(response.status).toBe(200);
|
||||||
|
|||||||
Reference in New Issue
Block a user