aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-comments.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-pearl-comments.el')
-rw-r--r--tests/test-pearl-comments.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test-pearl-comments.el b/tests/test-pearl-comments.el
index 99b705a..323d7b7 100644
--- a/tests/test-pearl-comments.el
+++ b/tests/test-pearl-comments.el
@@ -23,7 +23,7 @@
;; Comments subtree (ordered per `pearl-comment-sort-order'), including comments
;; in the issue render, the commentCreate helper (stubbed at the HTTP boundary),
;; the in-place append under the Comments subtree (creating it when absent), and the
-;; `pearl-add-comment' command.
+;; `pearl-create-comment' command.
;;; Code:
@@ -165,9 +165,9 @@
(should (< (progn (re-search-forward "first") (point))
(progn (re-search-forward "second") (point)))))))
-;;; pearl-add-comment
+;;; pearl-create-comment
-(ert-deftest test-pearl-add-comment-appends-returned-comment ()
+(ert-deftest test-pearl-create-comment-appends-returned-comment ()
"The command creates a comment and inserts the returned one in the buffer."
(test-pearl--in-org
"*** TODO [#B] Title\n:PROPERTIES:\n:LINEAR-ID: a\n:END:\nBody.\n"
@@ -176,25 +176,25 @@
(funcall cb (list :id "c1" :author "Craig"
:created-at "2026-05-23T14:00:00.000Z" :body body)))))
(re-search-forward "Body.")
- (pearl-add-comment "my new comment")
+ (pearl-create-comment "my new comment")
(goto-char (point-min))
(should (re-search-forward "^\\*\\*\\* 💬 Comments 1/1$" nil t))
(should (re-search-forward "my new comment" nil t)))))
-(ert-deftest test-pearl-add-comment-reports-failure ()
+(ert-deftest test-pearl-create-comment-reports-failure ()
"A failed create does not insert a Comments subtree."
(test-pearl--in-org
"*** TODO [#B] Title\n:PROPERTIES:\n:LINEAR-ID: a\n:END:\nBody.\n"
(cl-letf (((symbol-function 'pearl--create-comment-async)
(lambda (_id _body cb) (funcall cb nil))))
- (pearl-add-comment "x")
+ (pearl-create-comment "x")
(goto-char (point-min))
(should-not (re-search-forward "^\\*\\*\\* Comments$" nil t)))))
-(ert-deftest test-pearl-add-comment-not-on-issue-errors ()
+(ert-deftest test-pearl-create-comment-not-on-issue-errors ()
"Adding a comment outside a Linear issue heading signals a user error."
(test-pearl--in-org "* Plain heading\nno id\n"
- (should-error (pearl-add-comment "x") :type 'user-error)))
+ (should-error (pearl-create-comment "x") :type 'user-error)))
(ert-deftest test-pearl-append-comment-targets-current-issue-not-sibling ()
"Appending adds under the current issue's Comments, not a later issue's subtree."