aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-drill-smart-reschedule.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 14:06:48 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 14:06:48 -0500
commit0d32f8f6df9406c12306d97592446408ba7984e3 (patch)
treebecff5fbd172082fba54ed95a20f3133918c4118 /tests/test-org-drill-smart-reschedule.el
parent63713acf8238aceee199a5f595fda6470c633939 (diff)
downloadorg-drill-0d32f8f6df9406c12306d97592446408ba7984e3.tar.gz
org-drill-0d32f8f6df9406c12306d97592446408ba7984e3.zip
test: cover map-leitner-capture, response-mode, timer, sm2/simple8 dispatch
I added direct tests for `org-drill-map-leitner-capture' (route by DRILL_LEITNER_BOX), the response-mode exit-kind handlers (quit/edit/skip/ tags/rtn), `org-drill-presentation-timer-cancel', and the sm2/simple8 branches of `org-drill-smart-reschedule''s algorithm dispatcher. Coverage moved from 80.6% to 81.8%.
Diffstat (limited to 'tests/test-org-drill-smart-reschedule.el')
-rw-r--r--tests/test-org-drill-smart-reschedule.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test-org-drill-smart-reschedule.el b/tests/test-org-drill-smart-reschedule.el
index 49eddb0..6fbf3d6 100644
--- a/tests/test-org-drill-smart-reschedule.el
+++ b/tests/test-org-drill-smart-reschedule.el
@@ -91,6 +91,24 @@ because the cond compared nil with `=' before the type-guard."
(let ((scheduled (current-scheduled-time-string)))
(should scheduled)))))
+;;;; Algorithm dispatch (covers the cl-case branches in smart-reschedule)
+
+(ert-deftest test-org-drill-smart-reschedule-sm2-algorithm-schedules ()
+ "With sm2 selected, smart-reschedule still produces a SCHEDULED stamp."
+ (with-fresh-drill-entry
+ (with-fixed-now
+ (let ((org-drill-spaced-repetition-algorithm 'sm2))
+ (org-drill-smart-reschedule 5))
+ (should (current-scheduled-time-string)))))
+
+(ert-deftest test-org-drill-smart-reschedule-simple8-algorithm-schedules ()
+ "With simple8 selected, smart-reschedule still produces a SCHEDULED stamp."
+ (with-fresh-drill-entry
+ (with-fixed-now
+ (let ((org-drill-spaced-repetition-algorithm 'simple8))
+ (org-drill-smart-reschedule 5))
+ (should (current-scheduled-time-string)))))
+
;;;; Property side-effects
(ert-deftest test-org-drill-smart-reschedule-writes-drill-properties ()