Skip to content

Commit

Permalink
Use task_summaries() helper more
Browse files Browse the repository at this point in the history
We have a few tests that were still manually extracting and collecting
task summaries.
Switch to using the task_summaries() helper function that was devised
specifically for this very use case.
  • Loading branch information
d-e-s-o committed Apr 18, 2024
1 parent d6a5364 commit 9f3c15d
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/ui/termui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1339,11 +1339,8 @@ mod tests {
.await
.handle(events)
.await
.tasks()
.await
.into_iter()
.map(|x| x.summary())
.collect::<Vec<_>>();
.task_summaries()
.await;

let (.., mut expected) = make_tasks_with_tags(15);
expected[8].summary = "9ab".to_string();
Expand Down Expand Up @@ -2149,11 +2146,8 @@ mod tests {
.await
.handle(events)
.await
.tasks()
.await
.into_iter()
.map(|x| x.summary())
.collect::<Vec<_>>();
.task_summaries()
.await;

let (.., mut expected) = make_tasks_with_tags(15);
let task = expected.remove(12);
Expand Down Expand Up @@ -2192,11 +2186,8 @@ mod tests {
.await
.handle(events)
.await
.tasks()
.await
.into_iter()
.map(|x| x.summary())
.collect::<Vec<_>>();
.task_summaries()
.await;

let (.., mut expected) = make_tasks_with_tags(15);
expected[11].summary = "aa".to_string();
Expand Down

0 comments on commit 9f3c15d

Please sign in to comment.