|
28 | 28 | - [x] #work - Review open pull requests |
29 | 29 | - [x] #work - Fix the flaky test |
30 | 30 | ```) |
31 | | - (def plan ((parse plan-string) :plan)) |
| 31 | + (def parse-result (parse plan-string)) |
| 32 | + (def plan (parse-result :plan)) |
32 | 33 | (def inbox (plan :inbox)) |
33 | 34 | (def day-1 ((plan :days) 0)) |
34 | 35 | (def day-2 ((plan :days) 1)) |
|
51 | 52 | (test (not (task :done)) true) |
52 | 53 | (test (d/equal? (d/date 2020 7 30) (task :missed-on)) true)) |
53 | 54 | (test (= (d/date 2020 7 31) (day-2 :date)) true) |
54 | | - (test (= {:title "Talked to Mike & Molly"} ((day-2 :events) 0)) true) |
| 55 | + (let [event ((day-2 :events) 0)] |
| 56 | + (test (event :title) "Talked to Mike & Molly") |
| 57 | + (test (empty? (event :body)) true)) |
55 | 58 | (let [task ((day-2 :tasks) 0)] |
56 | 59 | (test (task :title) "#work - Review open pull requests") |
57 | 60 | (test (task :done) true)) |
|
193 | 196 | - They moved to a new apartment |
194 | 197 | - [x] Fix the lamp |
195 | 198 | ```) |
196 | | - (def plan ((parse plan-string) :plan)) |
| 199 | + (def parse-result (parse plan-string)) |
| 200 | + (def plan (parse-result :plan)) |
197 | 201 | (test (length (plan :days)) 1) |
198 | 202 | (let [day ((plan :days) 0) |
199 | 203 | event ((day :events) 0) |
200 | 204 | task ((day :tasks) 0)] |
| 205 | + (test (= (d/date 2020 7 30) (day :date)) true) |
201 | 206 | (test (event :title) "Talked to Mike & Molly") |
202 | 207 | (test ((event :body) 0) "- They moved to a new apartment") |
203 | | - (test (= (d/date 2020 7 30) (day :date)) true) |
204 | 208 | (test (task :title) "Fix the lamp") |
205 | 209 | (test (task :done) true))) |
206 | 210 |
|
|
0 commit comments