|
36 | 36 | (test (plan :title) "Main TODO") |
37 | 37 | (let [task (inbox 0)] |
38 | 38 | (test (task :title) "#home - Fix the lamp") |
39 | | - (test (not (task :done)) true)) |
| 39 | + (test (task :state) :open)) |
40 | 40 | (let [task (inbox 1)] |
41 | 41 | (test (task :title) "Update Rust") |
42 | | - (test (not (task :done)) true)) |
| 42 | + (test (task :state) :open)) |
43 | 43 | (test (= (d/date 2020 8 1) (day-1 :date)) true) |
44 | 44 | (let [task ((day-1 :tasks) 0)] |
45 | 45 | (test (task :title) "Develop photos") |
46 | | - (test (not (task :done)) true)) |
| 46 | + (test (task :state) :open)) |
47 | 47 | (let [task ((day-1 :tasks) 1)] |
48 | 48 | (test (task :title) "Pay bills") |
49 | | - (test (task :done) true)) |
| 49 | + (test (task :state) :checked)) |
50 | 50 | (let [task ((day-1 :tasks) 2)] |
51 | 51 | (test (task :title) "Fix the lamp") |
52 | | - (test (not (task :done)) true) |
| 52 | + (test (task :state) :open) |
53 | 53 | (test (d/equal? (d/date 2020 7 30) (task :missed-on)) true)) |
54 | 54 | (test (= (d/date 2020 7 31) (day-2 :date)) true) |
55 | 55 | (let [event ((day-2 :events) 0)] |
56 | 56 | (test (event :title) "Talked to Mike & Molly") |
57 | 57 | (test (empty? (event :body)) true)) |
58 | 58 | (let [task ((day-2 :tasks) 0)] |
59 | 59 | (test (task :title) "#work - Review open pull requests") |
60 | | - (test (task :done) true)) |
| 60 | + (test (task :state) :checked)) |
61 | 61 | (let [task ((day-2 :tasks) 1)] |
62 | 62 | (test (task :title) "#work - Fix the flaky test") |
63 | | - (test (task :done) true))) |
| 63 | + (test (task :state) :checked))) |
64 | 64 |
|
65 | 65 | (deftest "parses a template plan" |
66 | 66 | (def plan-string |
|
90 | 90 | task ((day :tasks) 0)] |
91 | 91 | (test (= (d/date 2020 7 30) (day :date)) true) |
92 | 92 | (test (task :title) "Pay bills") |
93 | | - (test (not (task :done)) true))) |
| 93 | + (test (task :state) :open))) |
94 | 94 |
|
95 | 95 | (deftest "parses a plan with one task that has a body" |
96 | 96 | (def plan-string |
|
110 | 110 | task-body (task :body)] |
111 | 111 | (test (= (d/date 2020 7 30) (day :date)) true) |
112 | 112 | (test (task :title) "Pay bills") |
113 | | - (test (not (task :done)) true) |
| 113 | + (test (task :state) :open) |
114 | 114 | (test (task-body 0) "- Electricity") |
115 | 115 | (test (task-body 1) "- Water"))) |
116 | 116 |
|
|
131 | 131 | task-2 ((day :tasks) 1)] |
132 | 132 | (test (= (d/date 2020 7 30) (day :date)) true) |
133 | 133 | (test (task-1 :title) "Pay bills") |
134 | | - (test (not (task-1 :done)) true) |
| 134 | + (test (task-1 :state) :open) |
135 | 135 | (test (task-2 :title) "Fix the lamp") |
136 | | - (test (task-2 :done) true))) |
| 136 | + (test (task-2 :state) :checked))) |
137 | 137 |
|
138 | 138 | (deftest "parses a plan without inbox" |
139 | 139 | (def plan-string |
|
206 | 206 | (test (event :title) "Talked to Mike & Molly") |
207 | 207 | (test ((event :body) 0) "- They moved to a new apartment") |
208 | 208 | (test (task :title) "Fix the lamp") |
209 | | - (test (task :done) true))) |
| 209 | + (test (task :state) :checked))) |
210 | 210 |
|
211 | 211 | (deftest "parses a plan with an event without any tasks" |
212 | 212 | (def plan-string |
|
0 commit comments