From 172cc18aadf7c30ac73bf05c46560d4e54e51e90 Mon Sep 17 00:00:00 2001 From: Tim Oram Date: Thu, 15 Feb 2024 09:59:46 -0330 Subject: Create test helper for Config::new --- src/modules/list/tests/external_editor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/list/tests/external_editor.rs') diff --git a/src/modules/list/tests/external_editor.rs b/src/modules/list/tests/external_editor.rs index 5a848a3..4ab0d85 100644 --- a/src/modules/list/tests/external_editor.rs +++ b/src/modules/list/tests/external_editor.rs @@ -7,7 +7,7 @@ fn normal_mode_open_external_editor() { &["pick aaa c1"], &[Event::from(StandardEvent::OpenInEditor)], |mut test_context| { - let mut module = create_list(&Config::new(), test_context.take_todo_file()); + let mut module = create_list(&create_config(), test_context.take_todo_file()); assert_results!( test_context.handle_event(&mut module), Artifact::Event(Event::from(StandardEvent::OpenInEditor)), @@ -26,7 +26,7 @@ fn visual_mode_open_external_editor() { Event::from(StandardEvent::OpenInEditor), ], |mut test_context| { - let mut module = create_list(&Config::new(), test_context.take_todo_file()); + let mut module = create_list(&create_config(), test_context.take_todo_file()); _ = test_context.handle_event(&mut module); assert_results!( test_context.handle_event(&mut module), @@ -48,7 +48,7 @@ fn cancels_search() { Event::from(StandardEvent::OpenInEditor), ], |mut test_context| { - let mut module = create_list(&Config::new(), test_context.take_todo_file()); + let mut module = create_list(&create_config(), test_context.take_todo_file()); _ = test_context.handle_all_events(&mut module); assert!(!module.search_bar.is_searching()); }, -- cgit v1.2.3