fix: update test to reflect empty layout being valid on room create
All checks were successful
Release / release (push) Successful in 7m19s

This commit is contained in:
2026-05-07 02:37:45 +02:00
parent fd6beb4591
commit ac1246900c

View File

@@ -341,16 +341,16 @@ mod tests {
}
#[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 (status, _) = post_json(
app,
"/api/admin/rooms",
&auth,
json!({"name":"Bad","layout":[]}),
json!({"name":"Empty","layout":[]}),
)
.await;
assert_eq!(status, StatusCode::BAD_REQUEST);
assert_eq!(status, StatusCode::CREATED);
}
#[sqlx::test(migrations = "./migrations")]