aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-list-comments.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-pearl-list-comments.el')
-rw-r--r--tests/test-pearl-list-comments.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test-pearl-list-comments.el b/tests/test-pearl-list-comments.el
index 630c712..be0880e 100644
--- a/tests/test-pearl-list-comments.el
+++ b/tests/test-pearl-list-comments.el
@@ -98,13 +98,14 @@
;;; --format-comments with a marker
-(ert-deftest test-pearl-format-comments-renders-marker-and-oldest-first ()
- "With count-info, the Comments heading carries the marker; bodies stay oldest-first."
- (let* ((comments (test-pearl--comments 5)) ; newest-first as fetched
+(ert-deftest test-pearl-format-comments-renders-marker-and-order ()
+ "With count-info the Comments heading carries the marker; bodies honor the sort order."
+ (let* ((pearl-comment-sort-order 'newest-first)
+ (comments (test-pearl--comments 5)) ; newest-first as fetched
(out (pearl--format-comments comments '(:shown 5 :total 12 :overflow nil))))
(should (string-match-p "^\\*\\*\\* Comments 💬 5/12$" out))
- ;; oldest (comment 1) renders before newest (comment 5)
- (should (< (string-match "comment 1\\b" out) (string-match "comment 5\\b" out)))))
+ ;; newest (comment 5) renders before oldest (comment 1)
+ (should (< (string-match "comment 5\\b" out) (string-match "comment 1\\b" out)))))
(ert-deftest test-pearl-format-comments-no-marker-without-count ()
"Without count-info (the single-issue thread), the heading has no marker."