From caca4dce67ba849325d258caf105cc2f98873440 Mon Sep 17 00:00:00 2001 From: Spencer Williams Date: Thu, 10 Jul 2025 14:02:03 -0400 Subject: Fix draft note titles showing up in backlinks --- lisp/seam-test.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lisp/seam-test.el') diff --git a/lisp/seam-test.el b/lisp/seam-test.el index 0abad2b..fc4e2d4 100644 --- a/lisp/seam-test.el +++ b/lisp/seam-test.el @@ -366,6 +366,21 @@ backlink." (insert-file-contents "html/bar.html") (buffer-string)))))) +(ert-deftest seam-test-backlinks-draft () + "Test that linking to a note from a draft note does not create a +backlink." + (should + (equal + "" + (seam-test-with-notes ((seam-export-template-string "{{backlinks}}")) + ((foo "foo" "public" nil t) + (bar "bar" "public")) + (with-current-buffer foo + (seam-test-add-contents foo (seam-test-link-to-buffer bar))) + (with-temp-buffer + (insert-file-contents "html/bar.html") + (buffer-string)))))) + (ert-deftest seam-test-set-type-private () "Test that setting a public note to private will delete its HTML file and update linking HTML files such that they no longer link to it." -- cgit v1.2.3