()
| 1189 | |
| 1190 | #[test] |
| 1191 | fn test_store_save_overwrites() { |
| 1192 | let (_dir, store) = make_store(); |
| 1193 | |
| 1194 | let mut session = make_session(); |
| 1195 | session.turn_count = 1; |
| 1196 | store.save(&session).unwrap(); |
| 1197 | |
| 1198 | session.turn_count = 5; |
| 1199 | store.save(&session).unwrap(); |
| 1200 | |
| 1201 | let loaded = store.load("sess-abc-123").unwrap().unwrap(); |
| 1202 | assert_eq!(loaded.turn_count, 5); |
| 1203 | } |
| 1204 | |
| 1205 | #[test] |
| 1206 | fn test_store_load_rejects_path_traversal() { |
nothing calls this directly
no test coverage detected