()
| 2066 | |
| 2067 | #[test] |
| 2068 | fn test_store_save_overwrites() { |
| 2069 | let (_dir, store) = make_store(); |
| 2070 | |
| 2071 | let mut session = make_session(); |
| 2072 | session.turn_count = 1; |
| 2073 | store.save(&session).unwrap(); |
| 2074 | |
| 2075 | session.turn_count = 5; |
| 2076 | store.save(&session).unwrap(); |
| 2077 | |
| 2078 | let loaded = store.load("sess-abc-123").unwrap().unwrap(); |
| 2079 | assert_eq!(loaded.turn_count, 5); |
| 2080 | } |
| 2081 | |
| 2082 | #[test] |
| 2083 | fn test_store_load_rejects_path_traversal() { |
nothing calls this directly
no test coverage detected