mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
fix sync test
This commit is contained in:
@@ -778,14 +778,28 @@ test content
|
||||
|
||||
# Check permalinks
|
||||
file_two_content, _ = await file_service.read_file(two_file)
|
||||
assert "permalink: one-1" in file_two_content
|
||||
assert "permalink: two" in file_two_content
|
||||
|
||||
# new content with duplicate permalink
|
||||
new_content = """
|
||||
---
|
||||
title: new.md
|
||||
type: note
|
||||
permalink: one
|
||||
tags: []
|
||||
---
|
||||
|
||||
test content
|
||||
"""
|
||||
new_file = project_dir / "new.md"
|
||||
await create_test_file(new_file)
|
||||
|
||||
# Run another time
|
||||
await sync_service.sync(test_config.home)
|
||||
|
||||
# Should still have same permalink
|
||||
file_one_content, _ = await file_service.read_file(two_file)
|
||||
assert "permalink: one-1" in file_one_content
|
||||
new_file_content, _ = await file_service.read_file(new_file)
|
||||
assert "permalink: new" in new_file_content
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user