aboutsummaryrefslogtreecommitdiff
path: root/lisp/seam-test.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/seam-test.el')
-rw-r--r--lisp/seam-test.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/lisp/seam-test.el b/lisp/seam-test.el
index 47d4fbb..13c52c6 100644
--- a/lisp/seam-test.el
+++ b/lisp/seam-test.el
@@ -506,6 +506,25 @@ it."
(seam-test-list-files))
(kill-buffer)))))))
+(ert-deftest seam-test-follow-link-new-draft ()
+ "Test that following a link to an nonexistent draft note creates
+and opens that note."
+ (should
+ (equal
+ '("-bar" ("private/-bar.org" "private/foo.org"))
+ (seam-test-with-notes ()
+ ((foo "foo"))
+ (with-current-buffer foo
+ (seam-test-add-contents foo "[[seam:-bar]]")
+ (goto-char 1)
+ (org-next-link)
+ (org-open-at-point)
+ (unwind-protect
+ (list
+ (buffer-name)
+ (seam-test-list-files))
+ (kill-buffer)))))))
+
(ert-deftest seam-test-escape-title ()
(should
(equal