()
| 190 | |
| 191 | #[tokio::test] |
| 192 | async fn test_update_with_decimal_operations() { |
| 193 | let ctx = setup_test_db().await; |
| 194 | |
| 195 | // Insert test data |
| 196 | ctx.execute( |
| 197 | "INSERT INTO accounts (name, balance, credit_limit) VALUES |
| 198 | ('Test', '1000.00', '5000.00')" |
| 199 | ).await.unwrap(); |
| 200 | |
| 201 | // Update with arithmetic |
| 202 | let result = ctx.execute( |
| 203 | "UPDATE accounts SET balance = balance * 1.1 WHERE name = 'Test'" |
| 204 | ).await.unwrap(); |
| 205 | |
| 206 | assert_eq!(result.rows_affected, 1); |
| 207 | |
| 208 | // Verify the update |
| 209 | let result = ctx.query("SELECT balance FROM accounts WHERE name = 'Test'").await.unwrap(); |
| 210 | assert_eq!(result.rows.len(), 1); |
| 211 | // Balance should be 1100.00 (stored as decimal) |
| 212 | } |
| 213 | |
| 214 | #[tokio::test] |
| 215 | async fn test_insert_select_with_decimal() { |
nothing calls this directly
no test coverage detected