()
| 363 | |
| 364 | #[tokio::test] |
| 365 | async fn put_to_replace_existing_item() { |
| 366 | let c = client(); |
| 367 | let t = tables().await; |
| 368 | let item = create_item(&t.simple_key_string); |
| 369 | c.put_item() |
| 370 | .table_name(&t.simple_key_string) |
| 371 | .set_item(Some(item.clone())) |
| 372 | .send() |
| 373 | .await |
| 374 | .unwrap(); |
| 375 | |
| 376 | let mut new_item = get_key(&t.simple_key_string, &item); |
| 377 | new_item.insert("str".into(), s("replaced")); |
| 378 | new_item.insert("num".into(), n(99)); |
| 379 | new_item.insert("extraAttr".into(), s("extra")); |
| 380 | c.put_item() |
| 381 | .table_name(&t.simple_key_string) |
| 382 | .set_item(Some(new_item.clone())) |
| 383 | .send() |
| 384 | .await |
| 385 | .unwrap(); |
| 386 | |
| 387 | let retrieved = check_item(c, &t.simple_key_string, &new_item).await; |
| 388 | assert!(!retrieved.contains_key("oldAttr")); |
| 389 | } |
| 390 | |
| 391 | #[tokio::test] |
| 392 | async fn put_item_with_expected_wrong_value() { |
nothing calls this directly
no test coverage detected