aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorSpencer Williams <spnw@plexwave.org>2025-07-10 13:44:24 -0400
committerSpencer Williams <spnw@plexwave.org>2025-07-10 13:49:48 -0400
commit96917b4701014066197c42bfb248e4362401cf2b (patch)
tree1f4cca3dfc20449d3787e0f53b73c4897d8db19d /lisp
parent5febe90b6b536ee07914717aa946d35346691975 (diff)
Fix backlinks tests
Diffstat (limited to 'lisp')
-rw-r--r--lisp/seam-test.el44
1 files changed, 24 insertions, 20 deletions
diff --git a/lisp/seam-test.el b/lisp/seam-test.el
index 797ce2b..0abad2b 100644
--- a/lisp/seam-test.el
+++ b/lisp/seam-test.el
@@ -338,29 +338,33 @@ notes such that they no longer link to it."
(ert-deftest seam-test-backlinks-private ()
"Test that linking to a note from a private note does not create a
backlink."
- (should-error
- (seam-test-with-notes ((seam-export-template-string "{{backlinks}}"))
- ((foo "foo")
- (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")
- (re-search-forward "<a href=\"/foo.html\">")))))
+ (should
+ (equal
+ ""
+ (seam-test-with-notes ((seam-export-template-string "{{backlinks}}"))
+ ((foo "foo")
+ (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-backlinks-delete ()
"Test that deleting a note removes backlink."
- (should-error
- (seam-test-with-notes ((seam-export-template-string "{{backlinks}}"))
- ((foo "foo" "public")
- (bar "bar" "public"))
- (with-current-buffer foo
- (seam-test-add-contents foo (seam-test-link-to-buffer bar)))
- (let ((delete-by-moving-to-trash nil))
- (seam-delete-note (buffer-file-name foo)))
- (with-temp-buffer
- (insert-file-contents "html/bar.html")
- (re-search-forward "<a href=\"/foo.html\">")))))
+ (should
+ (equal
+ ""
+ (seam-test-with-notes ((seam-export-template-string "{{backlinks}}"))
+ ((foo "foo" "public")
+ (bar "bar" "public"))
+ (with-current-buffer foo
+ (seam-test-add-contents foo (seam-test-link-to-buffer bar)))
+ (let ((delete-by-moving-to-trash nil))
+ (seam-delete-note (buffer-file-name foo)))
+ (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