fix sync test

This commit is contained in:
phernandez
2025-02-07 16:12:25 -06:00
parent ffbd091ad3
commit aad2c750bc
+17 -3
View File
@@ -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