aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-04 11:30:04 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-04 11:30:04 -0200
commit5332946380610d5166c2d7b517a817e021130edd (patch)
tree7a6a7fc8a20c7f30b502d46888a68ec6ce9d746b
parent53fdb88732568fb9c9e5d682f88371e602064d42 (diff)
More tests
-rw-r--r--test/test-state.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test-state.el b/test/test-state.el
index 32f52b2..7af4a64 100644
--- a/test/test-state.el
+++ b/test/test-state.el
@@ -7,6 +7,16 @@
(ert-deftest test-question-mark-read ()
"00ccd139248e782cd8316eff65c26aed838c7e46"
+ (with-question-data q 10
+ ;; Check basic logic.
+ (should (sx-question--mark-read q))
+ (should (sx-question--read-p q))
+ (should (not (setcdr (assq 10 (cdr (assoc "emacs" sx-question--user-read-list))) nil)))
+ ;; Don't freak out because the cdr was nil.
+ (should (not (sx-question--read-p q)))
+ (should (sx-question--mark-read q)))
(should
(with-question-data q nil
+ ;; Don't freak out because question_id was nil.
(sx-question--mark-read q))))
+