I'm trying to figure out how I can use ERT and libraries like el-mock to test simple functions that manipulate my org-document.
Consider a function like this:
(defun promote-next-heading ()
How would I write a test for this? Should I have a .org file dedicated for tests like these? And then when the headline gets promoted, how do I confirm this? And then revert it for the next test?
While the example above is contrived, I'm writing quite a few functions that manipulate or query my org document, and I really would feel better if I could test for it.