22 lines
703 B
TypeScript
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,
|
|
},
|
|
});
|
|
});
|
|
});
|