1 Commits
main ... v0.2.1

Author SHA1 Message Date
ac1246900c fix: update test to reflect empty layout being valid on room create
All checks were successful
Release / release (push) Successful in 7m19s
2026-05-07 02:37:45 +02:00

View File

@@ -341,16 +341,16 @@ mod tests {
} }
#[sqlx::test(migrations = "./migrations")] #[sqlx::test(migrations = "./migrations")]
async fn layout_validation_rejects_empty_layout(pool: sqlx::SqlitePool) { async fn layout_empty_layout_is_accepted(pool: sqlx::SqlitePool) {
let (app, auth) = build_test_app(pool).await; let (app, auth) = build_test_app(pool).await;
let (status, _) = post_json( let (status, _) = post_json(
app, app,
"/api/admin/rooms", "/api/admin/rooms",
&auth, &auth,
json!({"name":"Bad","layout":[]}), json!({"name":"Empty","layout":[]}),
) )
.await; .await;
assert_eq!(status, StatusCode::BAD_REQUEST); assert_eq!(status, StatusCode::CREATED);
} }
#[sqlx::test(migrations = "./migrations")] #[sqlx::test(migrations = "./migrations")]