fix: Fixes failing tests for purchase order creation in view routes.
This commit is contained in:
@@ -213,7 +213,8 @@ extension ViewController {
|
|||||||
for: route,
|
for: route,
|
||||||
isHtmxRequest: true,
|
isHtmxRequest: true,
|
||||||
logger: .init(label: "tests"),
|
logger: .init(label: "tests"),
|
||||||
authenticate: { _ in }
|
authenticate: { _ in },
|
||||||
|
currentUser: { .mock }
|
||||||
)
|
)
|
||||||
return html.renderFormatted()
|
return html.renderFormatted()
|
||||||
}
|
}
|
||||||
@@ -428,6 +429,17 @@ extension PurchaseOrder.Create {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension PurchaseOrder.CreateIntermediate {
|
||||||
|
static var mock: Self {
|
||||||
|
.init(
|
||||||
|
materials: "bar",
|
||||||
|
customer: "Testy McTestface",
|
||||||
|
createdForID: UUID(0),
|
||||||
|
vendorBranchID: UUID(0)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extension User.ResetPassword {
|
extension User.ResetPassword {
|
||||||
static var mock: Self {
|
static var mock: Self {
|
||||||
.init(password: "super-secret", confirmPassword: "super-secret")
|
.init(password: "super-secret", confirmPassword: "super-secret")
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ struct PurchaseOrderViewRouteTests {
|
|||||||
materials: "some",
|
materials: "some",
|
||||||
customer: "Testy",
|
customer: "Testy",
|
||||||
truckStock: false,
|
truckStock: false,
|
||||||
createdByID: id,
|
|
||||||
createdForID: id,
|
createdForID: id,
|
||||||
vendorBranchID: id
|
vendorBranchID: id
|
||||||
))))
|
))))
|
||||||
|
|||||||
Reference in New Issue
Block a user