diff options
Diffstat (limited to 'tests/test-pearl-org-parse.el')
| -rw-r--r-- | tests/test-pearl-org-parse.el | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/tests/test-pearl-org-parse.el b/tests/test-pearl-org-parse.el index 87f4a02..e0bb967 100644 --- a/tests/test-pearl-org-parse.el +++ b/tests/test-pearl-org-parse.el @@ -19,12 +19,10 @@ ;;; Commentary: -;; Tests for the org readers `pearl--extract-org-heading-properties' and -;; `pearl--process-heading-at-point'. The reader uses org APIs over the -;; LINEAR-* property drawer, so it works from anywhere in the entry, at any -;; heading depth, and is unbothered by body text or nested sub-entries. The one -;; network boundary reached during processing (`--update-issue-state-async') is -;; stubbed. +;; Tests for the org reader `pearl--extract-org-heading-properties'. It uses +;; org APIs over the LINEAR-* property drawer, so it works from anywhere in the +;; entry, at any heading depth, and is unbothered by body text or nested +;; sub-entries. ;;; Code: @@ -100,29 +98,8 @@ (goto-char (point-min)) (should (null (pearl--extract-org-heading-properties))))) -;;; process-heading-at-point - -(ert-deftest test-pearl-process-heading-updates-when-complete () - "A complete entry triggers an async state update with the mapped state." - (let ((captured nil)) - (cl-letf (((symbol-function 'pearl--update-issue-state-async) - (lambda (id state team) (setq captured (list id state team))))) - (test-pearl--in-org - "*** IN-PROGRESS x\n:PROPERTIES:\n:LINEAR-ID: i-1\n:LINEAR-IDENTIFIER: ENG-2\n:LINEAR-TEAM-ID: t-1\n:END:\n" - (re-search-forward "x") - (pearl--process-heading-at-point) - (should (equal '("i-1" "In Progress" "t-1") captured)))))) - -(ert-deftest test-pearl-process-heading-skips-without-team () - "An entry missing its team id makes no API call." - (let ((called nil)) - (cl-letf (((symbol-function 'pearl--update-issue-state-async) - (lambda (&rest _) (setq called t)))) - (test-pearl--in-org - "*** TODO x\n:PROPERTIES:\n:LINEAR-ID: i-1\n:LINEAR-IDENTIFIER: ENG-2\n:END:\n" - (re-search-forward "x") - (pearl--process-heading-at-point) - (should-not called))))) +;; process-heading-at-point (the org-sync per-heading state push) was removed +;; in save-model-v2; the extractor above is retained for the keyword-cycle save. ;;; render -> parse round trip |
