fix(sonarr): Pass the series ID and season number alongside all TriggerAutomaticSeasonSearch events when publishing to the networking channel
This commit is contained in:
@@ -276,7 +276,7 @@ mod tests {
|
||||
#[rstest]
|
||||
#[case(
|
||||
ActiveSonarrBlock::AutomaticallySearchSeasonPrompt,
|
||||
SonarrEvent::TriggerAutomaticSeasonSearch(None)
|
||||
SonarrEvent::TriggerAutomaticSeasonSearch((0, 0))
|
||||
)]
|
||||
#[case(
|
||||
ActiveSonarrBlock::DeleteEpisodeFilePrompt,
|
||||
@@ -713,7 +713,7 @@ mod tests {
|
||||
#[rstest]
|
||||
#[case(
|
||||
ActiveSonarrBlock::AutomaticallySearchSeasonPrompt,
|
||||
SonarrEvent::TriggerAutomaticSeasonSearch(None)
|
||||
SonarrEvent::TriggerAutomaticSeasonSearch((0, 0))
|
||||
)]
|
||||
#[case(
|
||||
ActiveSonarrBlock::DeleteEpisodeFilePrompt,
|
||||
@@ -854,6 +854,23 @@ mod tests {
|
||||
.extract_episode_id();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_extract_series_id_season_number_tuple() {
|
||||
let mut app = App::default();
|
||||
app.data.sonarr_data = create_test_sonarr_data();
|
||||
|
||||
let (series_id, season_number) = SeasonDetailsHandler::with(
|
||||
DEFAULT_KEYBINDINGS.esc.key,
|
||||
&mut app,
|
||||
ActiveSonarrBlock::SeasonDetails,
|
||||
None,
|
||||
)
|
||||
.extract_series_id_season_number_tuple();
|
||||
|
||||
assert_eq!(series_id, 0);
|
||||
assert_eq!(season_number, 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_season_details_handler_is_not_ready_when_loading() {
|
||||
let mut app = App::default();
|
||||
|
||||
Reference in New Issue
Block a user