From 85c7345492e67dbc61734e3be3db6597dcf8fa4f Mon Sep 17 00:00:00 2001 From: Alexandre Pasmantier Date: Tue, 22 Apr 2025 00:30:37 +0200 Subject: [PATCH] test: a little fix --- tests/app.rs | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/tests/app.rs b/tests/app.rs index 238cf0f..9aab002 100644 --- a/tests/app.rs +++ b/tests/app.rs @@ -167,25 +167,13 @@ async fn test_app_exact_search_multiselect() { .expect("app did not finish within the default timeout") .unwrap(); - assert!(output.selected_entries.is_some()); - assert!(&output - .selected_entries - .clone() - .unwrap() - .drain() - .next() - .unwrap() - .value - .is_none()); + let selected_entries = output.selected_entries.clone(); + assert!(selected_entries.is_some()); + // should contain a single entry with the prompt + assert!(!selected_entries.as_ref().unwrap().is_empty()); assert_eq!( - output - .selected_entries - .as_ref() - .unwrap() - .iter() - .map(|e| &e.name) - .collect::>(), - HashSet::from([&"fie".to_string()]) + selected_entries.unwrap().drain().next().unwrap().name, + "fie" ); }