feat: Removes old tests, fixes authentication middleware not working, view routes updated to not have delete routes and uses api routes for delete methods.

This commit is contained in:
2025-01-24 10:55:59 -05:00
parent aa60f69758
commit 90c6058d56
37 changed files with 146 additions and 564 deletions

View File

@@ -182,7 +182,12 @@ struct ViewControllerTests {
extension ViewController {
func render(_ route: ViewRoute) async throws -> String {
guard let html = try await view(for: route, isHtmxRequest: true, authenticate: { _ in }) else {
guard let html = try await view(
for: route,
isHtmxRequest: true,
logger: .init(label: "tests"),
authenticate: { _ in }
) else {
throw TestError()
}
return html.renderFormatted()
@@ -380,6 +385,12 @@ extension PurchaseOrder {
extension PurchaseOrder.Create {
static var mock: Self {
.init(materials: "bar", customer: "Testy McTestface", createdByID: UUID(0), createdForID: UUID(0), vendorBranchID: UUID(0))
.init(
materials: "bar",
customer: "Testy McTestface",
createdByID: UUID(0),
createdForID: UUID(0),
vendorBranchID: UUID(0)
)
}
}