From ac1246900c14f773516e20b0edfa5f9aa4cb6d1d Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Thu, 7 May 2026 02:37:45 +0200 Subject: [PATCH] fix: update test to reflect empty layout being valid on room create --- backend/src/routes/rooms.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/routes/rooms.rs b/backend/src/routes/rooms.rs index e19d723..addc37a 100644 --- a/backend/src/routes/rooms.rs +++ b/backend/src/routes/rooms.rs @@ -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")]