diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-pearl-grouping.el | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test-pearl-grouping.el b/tests/test-pearl-grouping.el index 13a84d5..a30bcc1 100644 --- a/tests/test-pearl-grouping.el +++ b/tests/test-pearl-grouping.el @@ -327,5 +327,32 @@ SE-1 has a comment subtree; SE-2 has no assignee.") 'no-issues))) (should-not (plist-get (pearl--read-active-source) :client-group)))) +;;; render integration — consumers read pearl--effective-grouping (phase 4) + +(defconst test-pearl-grouping--issues + (list (list :id "i1" :identifier "SE-1" :title "Alpha" + :state '(:name "In Progress") :project '(:name "Apollo") :priority 2) + (list :id "i2" :identifier "SE-2" :title "Beta" + :state '(:name "Todo") :project '(:name "Apollo") :priority 1)) + "Two normalized issues with distinct states, one shared project.") + +(ert-deftest test-pearl-build-org-content-client-group-overrides-server () + "The full render groups by :client-group, overriding a view's server :group." + (let ((out (pearl--build-org-content + test-pearl-grouping--issues + '(:type view :name "V" :id "vid" :group "project" + :client-group "workflowState")))) + (should (string-match-p "^\\*\\* In Progress$" out)) + (should (string-match-p "^\\*\\* Todo$" out)) + (should-not (string-match-p "^\\*\\* Apollo$" out)))) + +(ert-deftest test-pearl-build-org-content-server-group-when-no-client () + "With no :client-group, the full render still honors the view's server :group." + (let ((out (pearl--build-org-content + test-pearl-grouping--issues + '(:type view :name "V" :id "vid" :group "project")))) + (should (string-match-p "^\\*\\* Apollo$" out)) + (should-not (string-match-p "^\\*\\* In Progress$" out)))) + (provide 'test-pearl-grouping) ;;; test-pearl-grouping.el ends here |
