summaryrefslogtreecommitdiff
path: root/jt.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-07-20 10:29:40 +0300
committerLars Wirzenius <liw@liw.fi>2021-07-20 10:36:07 +0300
commit86050e18b21181a4006fd1a5b872c792e7900683 (patch)
tree631b6ba9e8868b07c9447da90c002eac200e0801 /jt.md
parentda1826ddfb71a0596b09e04de10b33b9d1e60c7d (diff)
downloadjt2-86050e18b21181a4006fd1a5b872c792e7900683.tar.gz
feat: add command to remove a draft
Sponsored-by: author
Diffstat (limited to 'jt.md')
-rw-r--r--jt.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/jt.md b/jt.md
index f2729ff..9c561da 100644
--- a/jt.md
+++ b/jt.md
@@ -231,6 +231,36 @@ then there are no uncommitted changes in jrnl
+## Remove a draft
+
+Verify that we can remove a draft, and then create a new one.
+
+~~~scenario
+given an installed jt
+
+when I run jt2 --dirname jrnl init default "My test journal"
+then command is successful
+and there are no drafts in jrnl
+and there are no journal entries in jrnl
+
+when I run jt2 --editor=none --dirname=jrnl new "Hulabaloo"
+then command is successful
+and there is one draft in jrnl
+and draft 0 in jrnl contains "Hulabaloo"
+and draft 0 in jrnl contains "!meta date="
+
+when I run jt2 --dirname=jrnl remove 0
+then command is successful
+and there are no drafts in jrnl
+and there are no journal entries in jrnl
+
+when I run jt2 --editor=none --dirname=jrnl new "Abracadabra"
+then command is successful
+and there is one draft in jrnl
+and draft 0 in jrnl contains "Abracadabra"
+and draft 0 in jrnl contains "!meta date="
+~~~
+
## Override template for new journal entries
Verify that we can have a custom template for new journal entries.