tests: close remaining contract gaps (action-dispatch, org-headline-add/find-by-id, tangle-sync, create-note, messaging-link/unlink)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 5s
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 5s
This commit is contained in:
@@ -364,5 +364,18 @@ and dispatches as needed. Called by the deterministic gate."
|
||||
"Contract 2: archivist-headline-to-filename sanitizes titles."
|
||||
(let ((filename (archivist-headline-to-filename "My Project: Overview")))
|
||||
(is (search "my_project_overview" filename :test #'char-equal))
|
||||
(is (not (search ":" filename)))))
|
||||
(is (not (search ":" filename))))
|
||||
|
||||
(test test-archivist-create-note
|
||||
"Contract 3: archivist-create-note writes a Zettelkasten note to disk."
|
||||
(let* ((tmp-dir "/tmp/passepartout-archivist-test/")
|
||||
(headline (list :title "Test Note" :content "Some content" :tags '("test" "atomic"))))
|
||||
(uiop:ensure-all-directories-exist (list tmp-dir))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(is (eq t (archivist-create-note headline tmp-dir "/tmp/source.org"))
|
||||
"Expected note creation to return T")
|
||||
(is (uiop:file-exists-p (merge-pathnames "test_note.org" tmp-dir))
|
||||
"Expected file test_note.org to exist"))
|
||||
(uiop:delete-directory-tree (uiop:ensure-directory-pathname tmp-dir) :validate t))))
|
||||
#+end_src
|
||||
Reference in New Issue
Block a user