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