aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-states.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-pearl-states.el')
-rw-r--r--tests/test-pearl-states.el36
1 files changed, 4 insertions, 32 deletions
diff --git a/tests/test-pearl-states.el b/tests/test-pearl-states.el
index 713cb78..ae8ef63 100644
--- a/tests/test-pearl-states.el
+++ b/tests/test-pearl-states.el
@@ -97,38 +97,10 @@
(pearl-update-issue-state "i-1" "Done" "team-1")
(should requested))))
-;;; pearl--update-issue-state-async -- nil-state-id guard
-
-(ert-deftest test-pearl-update-issue-state-async-nil-state-id-skips-request ()
- "The async update also short-circuits when the state name doesn't resolve."
- (let ((requested nil)
- (pearl-api-key "test-key"))
- (cl-letf (((symbol-function 'pearl--get-state-id-by-name) (lambda (_s _t) nil))
- ((symbol-function 'request) (lambda (&rest _) (setq requested t))))
- (pearl--update-issue-state-async "i-1" "Nonexistent" "team-1")
- (should-not requested))))
-
-(ert-deftest test-pearl-update-issue-state-async-success-runs ()
- "The async success handler runs on a successful update."
- (let ((pearl-api-key "test-key"))
- (cl-letf (((symbol-function 'pearl--get-state-id-by-name) (lambda (_s _t) "s2"))
- ((symbol-function 'request)
- (lambda (_url &rest args)
- (funcall (plist-get args :success)
- :data '((data (issueUpdate (success . t))))))))
- (should (progn (pearl--update-issue-state-async "i-1" "Done" "team-1") t)))))
-
-(ert-deftest test-pearl-update-issue-state-async-error-runs ()
- "The async error handler runs on a transport error."
- (let ((pearl-api-key "test-key"))
- (cl-letf (((symbol-function 'pearl--get-state-id-by-name) (lambda (_s _t) "s2"))
- ((symbol-function 'request)
- (lambda (_url &rest args)
- (funcall (plist-get args :error)
- :error-thrown "boom"
- :response (make-request-response :status-code 500)
- :data nil))))
- (should (progn (pearl--update-issue-state-async "i-1" "Done" "team-1") t)))))
+;; pearl--update-issue-state-async (the by-name state push) was removed with
+;; the org-sync path in save-model-v2. State now pushes through the save
+;; engine's pearl--save-state-field -> pearl--update-issue-async (stateId),
+;; covered in test-pearl-save.
(provide 'test-pearl-states)
;;; test-pearl-states.el ends here