|
17 | 17 | (let [day ((plan :days) 0) |
18 | 18 | task ((day :tasks) 0)] |
19 | 19 | (test (task :title) "Contact John Doe") |
20 | | - (test (task :done) false) |
| 20 | + (test (task :state) :open) |
21 | 21 | (test (empty? (task :body)) true))) |
22 | 22 |
|
23 | 23 | (deftest "schedules contacts for future" |
|
33 | 33 | (if (= 1 (length (day-2 :tasks))) |
34 | 34 | (let [task ((day-2 :tasks) 0)] |
35 | 35 | (test (task :title) "Contact John Doe") |
36 | | - (test (task :done) false) |
| 36 | + (test (task :state) :open) |
37 | 37 | (test (empty? (task :body)) true)))) |
38 | 38 |
|
39 | 39 | (deftest "schedules contacts with birthday" |
|
46 | 46 | (let [day ((plan :days) 0) |
47 | 47 | task ((day :tasks) 0)] |
48 | 48 | (test (task :title) "Congratulate birthday to John Doe") |
49 | | - (test (task :done) false) |
| 49 | + (test (task :state) :open) |
50 | 50 | (test (empty? (task :body)) true))) |
51 | 51 |
|
52 | 52 | (deftest "schedules contacts with missed birthday" |
|
70 | 70 | (def day-1 (day/build-day (d/date 2022 4 26))) |
71 | 71 | (def day-2 (day/build-day (d/date 2022 4 25) |
72 | 72 | @[] |
73 | | - @[(task/build-task "Weekly meeting" false)])) |
| 73 | + @[(task/build-task "Weekly meeting" :open)])) |
74 | 74 | (def plan (plan/build-plan :days @[day-1 day-2])) |
75 | 75 | (schedule-contacts plan @[contact] (d/date 2022 4 26)) |
76 | 76 | (test (not (empty? (day-1 :tasks))) true) |
|
103 | 103 | (def day-1 (day/build-day (d/date 2022 4 27))) |
104 | 104 | (def day-2 (day/build-day (d/date 2022 4 26) |
105 | 105 | @[] |
106 | | - @[(task/build-task "Congratulate birthday to John Doe" true)])) |
| 106 | + @[(task/build-task "Congratulate birthday to John Doe" :checked)])) |
107 | 107 | (def day-3 (day/build-day (d/date 2022 4 25) |
108 | 108 | @[] |
109 | | - @[(task/build-task "Weekly meeting" false)])) |
| 109 | + @[(task/build-task "Weekly meeting" :open)])) |
110 | 110 | (def plan (plan/build-plan :days @[day-1 day-2 day-3])) |
111 | 111 | (schedule-contacts plan @[contact] (d/date 2022 4 27)) |
112 | 112 | (test (empty? (day-1 :tasks)) true)) |
|
0 commit comments