all tests are passing

This commit is contained in:
filipriec
2025-03-05 19:59:17 +01:00
parent a535156aad
commit 8d7335a46e

View File

@@ -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)