fix(sonarr): Corrected a bug that would cause a crash if a user spams the ESC key while searching for a new series and the search results are still loading

This commit is contained in:
2024-12-17 22:45:34 -07:00
parent fedb78fb88
commit acf983c07c
2 changed files with 16 additions and 1 deletions
@@ -1714,6 +1714,20 @@ mod tests {
});
}
#[test]
fn test_add_series_search_no_panic_on_none_search_result() {
let mut app = App::default();
app.data.sonarr_data.add_series_search = None;
AddSeriesHandler::with(
DEFAULT_KEYBINDINGS.esc.key,
&mut app,
ActiveSonarrBlock::AddSeriesSearchResults,
None,
)
.handle();
}
#[test]
fn test_build_add_series_body() {
let mut app = App::default();