diff options
Diffstat (limited to 'tests/ss-capture-tests.el')
| -rw-r--r-- | tests/ss-capture-tests.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/ss-capture-tests.el b/tests/ss-capture-tests.el index 0af27a5..b91d4ef 100644 --- a/tests/ss-capture-tests.el +++ b/tests/ss-capture-tests.el @@ -84,7 +84,7 @@ (when (file-exists-p file) (delete-file file))))) -(ert-deftest ss-open-journal-keeps-end-fallback-when-today-missing () +(ert-deftest ss-open-journal-creates-missing-today-entry-with-standard-sections () (let* ((file (make-temp-file "ss-journal" nil ".org")) (ss-journal-file file)) (unwind-protect @@ -96,8 +96,13 @@ "*** Notes\n")) (let ((org-overriding-default-time (encode-time 0 0 12 9 4 2026))) (ss-open-journal) - (should-not (buffer-narrowed-p)) - (should (eobp)))) + (should (buffer-narrowed-p)) + (should (equal (org-get-outline-path t) + '("2026" "2026-04-09 Thursday"))) + (should (string-match-p + (regexp-quote + "** 2026-04-09 Thursday\n*** Tasks\n*** Notes\n*** Meetings\n") + (buffer-string))))) (when (buffer-live-p (current-buffer)) (kill-buffer (current-buffer))) (when (file-exists-p file) |
