()
| 1126 | |
| 1127 | #[test] |
| 1128 | fn test_store_save_overwrites() { |
| 1129 | let (_dir, store) = make_store(); |
| 1130 | |
| 1131 | let mut session = make_session(); |
| 1132 | session.turn_count = 1; |
| 1133 | store.save(&session).unwrap(); |
| 1134 | |
| 1135 | session.turn_count = 5; |
| 1136 | store.save(&session).unwrap(); |
| 1137 | |
| 1138 | let loaded = store.load("sess-abc-123").unwrap().unwrap(); |
| 1139 | assert_eq!(loaded.turn_count, 5); |
| 1140 | } |
| 1141 | |
| 1142 | #[test] |
| 1143 | fn test_store_load_rejects_path_traversal() { |
nothing calls this directly
no test coverage detected