web routing is POG now

This commit is contained in:
Priec
2026-08-12 23:40:14 +02:00
parent 10c8235420
commit f8e483efa8
28 changed files with 1015 additions and 697 deletions

View File

@@ -286,8 +286,14 @@ mod tests {
/// answers with the redirect to the login page rather than a 404 or a call
/// to the backend.
#[tokio::test]
async fn the_table_definition_workspace_is_mounted_and_needs_a_session() {
for path in ["/admin/table-definition", "/admin/table-definition/workspace"] {
async fn the_table_definition_pages_are_mounted_and_need_a_session() {
for path in [
"/admin/tables/columns",
"/admin/tables/delete",
"/admin/profiles/copy",
"/admin/profiles/history",
"/admin/tables/from-template",
] {
let (status, _) = get(path).await;
assert_eq!(
status,
@@ -296,13 +302,18 @@ mod tests {
);
}
// The workspace these came out of is gone, and anything still pointing
// at it lands on the browser rather than on a 404.
let (status, _) = get("/admin/table-definition").await;
assert_eq!(status, axum::http::StatusCode::PERMANENT_REDIRECT);
for path in [
"/admin/table-definition/columns",
"/admin/table-definition/columns/builder",
"/admin/table-definition/rename",
"/admin/table-definition/delete",
"/admin/table-definition/copy",
"/admin/table-definition/invoice-template",
"/admin/tables/columns",
"/admin/tables/columns/builder",
"/admin/tables/rename",
"/admin/tables/delete",
"/admin/profiles/copy",
"/admin/tables/from-template",
] {
let response = test_router()
.oneshot(