From 4ff3e88492225e6852e780399a81c4f27f8a10ab Mon Sep 17 00:00:00 2001 From: Szymon Szukalski Date: Thu, 9 Apr 2026 12:04:58 +1000 Subject: Refine focused journal session --- tests/ss-capture-tests.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests') 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) -- cgit v1.2.3