diff --git a/tests/sync/test_sync_service.py b/tests/sync/test_sync_service.py index 2993b08c..a2e332e9 100644 --- a/tests/sync/test_sync_service.py +++ b/tests/sync/test_sync_service.py @@ -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