From 8d7335a46e00c1c1ac077d8fdf4e5ad69c76f605 Mon Sep 17 00:00:00 2001 From: filipriec Date: Wed, 5 Mar 2025 19:59:17 +0100 Subject: [PATCH] all tests are passing --- .../handlers/get_table_data_by_position_test.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/tests/tables_data/handlers/get_table_data_by_position_test.rs b/server/tests/tables_data/handlers/get_table_data_by_position_test.rs index ad7ef68..c33ab38 100644 --- a/server/tests/tables_data/handlers/get_table_data_by_position_test.rs +++ b/server/tests/tables_data/handlers/get_table_data_by_position_test.rs @@ -37,13 +37,19 @@ async fn setup_test_environment(pool: &PgPool) -> (String, String, i64) { .await .unwrap(); - // Create table definition + // Create table definition with proper columns + let columns_json = serde_json::json!([ + r#""id" BIGSERIAL PRIMARY KEY"#, + r#""deleted" BOOLEAN NOT NULL DEFAULT FALSE"#, + r#""firma" TEXT NOT NULL"# + ]); + sqlx::query!( r#"INSERT INTO table_definitions (profile_id, table_name, columns, indexes) VALUES ($1, $2, $3, $4)"#, profile_id, table_name, - json!({}), + columns_json, // Use proper columns array json!([]) ) .execute(&mut *tx)