()
| 1070 | |
| 1071 | #[test] |
| 1072 | fn test_store_save_overwrites() { |
| 1073 | let (_dir, store) = make_store(); |
| 1074 | |
| 1075 | let mut session = make_session(); |
| 1076 | session.turn_count = 1; |
| 1077 | store.save(&session).unwrap(); |
| 1078 | |
| 1079 | session.turn_count = 5; |
| 1080 | store.save(&session).unwrap(); |
| 1081 | |
| 1082 | let loaded = store.load("sess-abc-123").unwrap().unwrap(); |
| 1083 | assert_eq!(loaded.turn_count, 5); |
| 1084 | } |
| 1085 | |
| 1086 | #[test] |
| 1087 | fn test_store_load_rejects_path_traversal() { |
nothing calls this directly
no test coverage detected