aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-heading.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-pearl-heading.el')
-rw-r--r--tests/test-pearl-heading.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test-pearl-heading.el b/tests/test-pearl-heading.el
index 2675518..a780143 100644
--- a/tests/test-pearl-heading.el
+++ b/tests/test-pearl-heading.el
@@ -82,8 +82,18 @@
;;; rendering on / off
-(ert-deftest test-pearl-format-heading-defaults-prefix-and-title-case ()
- "By default the heading carries the identifier prefix and a title-cased title."
+(ert-deftest test-pearl-format-heading-default-prefix-verbatim-title ()
+ "By default the heading carries the identifier prefix and the verbatim title,
+matching Linear's own capitalization."
+ (let ((pearl-show-identifier-in-heading t)
+ (pearl-title-case-headings nil))
+ (let ((out (pearl--format-issue-as-org-entry
+ '(:id "u" :identifier "SE-401" :title "fix the refresh bug"
+ :priority 2 :state (:name "Todo")))))
+ (should (string-match-p "^\\*\\* TODO \\[#B\\] SE-401: fix the refresh bug$" out)))))
+
+(ert-deftest test-pearl-format-heading-title-case-opt-in ()
+ "With title-casing opted in, the title is smart-cased; the prefix is unaffected."
(let ((pearl-show-identifier-in-heading t)
(pearl-title-case-headings t))
(let ((out (pearl--format-issue-as-org-entry