Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ac1246900c |
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user