integratedhub/tests/e2e/api/properties-api.spec.ts
2026-02-14 02:20:19 +00:00

22 lines
703 B
TypeScript

import { test } from "@playwright/test";
import { expectApiAuthRequired } from "../helpers/auth-assertions.ts";
test.describe("Property Data API Auth", () => {
test("GET landlord dashboard payload requires authentication", async ({ request }) => {
await expectApiAuthRequired(request, "/api/retrieve/landlord_dashboard");
});
test("POST create lease requires authentication", async ({ request }) => {
await expectApiAuthRequired(request, "/api/create/lease", {
method: "POST",
data: {
property_id: "prop-test",
tenant_id: "tenant-test",
start_date: Date.now(),
end_date: Date.now() + 86_400_000,
rent: 1000,
},
});
});
});