summaryrefslogtreecommitdiff
path: root/tests/ss-capture-tests.el
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@szymonszukalski.com>2026-04-09 12:04:58 +1000
committerSzymon Szukalski <szymon@szymonszukalski.com>2026-04-09 12:04:58 +1000
commit4ff3e88492225e6852e780399a81c4f27f8a10ab (patch)
tree563f21cf60a42fabefd1ab05a42a2c27f9f522ae /tests/ss-capture-tests.el
parent8fa5aa983a7be1be78d736223d733f1da1330ec2 (diff)
Refine focused journal session
Diffstat (limited to 'tests/ss-capture-tests.el')
-rw-r--r--tests/ss-capture-tests.el11
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)