()
| 1321 | |
| 1322 | #[test] |
| 1323 | fn test_insert() -> ResultTest<()> { |
| 1324 | let (db, mut input) = create_data(1)?; |
| 1325 | |
| 1326 | let result = run_for_testing(&db, "INSERT INTO inventory (inventory_id, name) VALUES (2, 'test')")?; |
| 1327 | |
| 1328 | assert_eq!(result.len(), 0, "Return results"); |
| 1329 | |
| 1330 | let mut result = run_for_testing(&db, "SELECT * FROM inventory")?; |
| 1331 | |
| 1332 | input.data.push(product![2u64, "test"]); |
| 1333 | input.data.sort(); |
| 1334 | result.sort(); |
| 1335 | |
| 1336 | assert_eq!(result, input.data, "Inventory"); |
| 1337 | |
| 1338 | Ok(()) |
| 1339 | } |
| 1340 | |
| 1341 | #[test] |
| 1342 | fn test_delete() -> ResultTest<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…