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:
@@ -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)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user