This commit is contained in:
@@ -55,3 +55,22 @@ def test_memory_store_renames_threads_and_deletes_outbox_items(tmp_path):
|
||||
assert renamed["title"] == "Market Check"
|
||||
assert deleted is True
|
||||
assert store.list_outbox() == []
|
||||
|
||||
|
||||
def test_memory_store_uses_absolute_path_across_working_directory_changes(tmp_path, monkeypatch):
|
||||
original_cwd = tmp_path / "start"
|
||||
original_cwd.mkdir()
|
||||
monkeypatch.chdir(original_cwd)
|
||||
|
||||
store = MemoryStore("data/memory.sqlite3")
|
||||
|
||||
moved_cwd = tmp_path / "moved"
|
||||
moved_cwd.mkdir()
|
||||
monkeypatch.chdir(moved_cwd)
|
||||
|
||||
store.add_outbox("Notification survived cwd change")
|
||||
|
||||
snapshot = store.inspect()
|
||||
|
||||
assert store.path.is_absolute()
|
||||
assert snapshot["outbox"][0]["content"] == "Notification survived cwd change"
|
||||
|
||||
Reference in New Issue
Block a user