()
| 203 | |
| 204 | #[tokio::test] |
| 205 | async fn test_write_query_rejection() { |
| 206 | let config = Arc::new(Config::load()); |
| 207 | let handler = ReadOnlyDbHandler::new(":memory:", config).unwrap(); |
| 208 | |
| 209 | let result = handler.query("INSERT INTO test VALUES (1)").await; |
| 210 | assert!(matches!(result, Err(ReadOnlyError::WriteNotAllowed))); |
| 211 | } |
| 212 | } |