fix: Blocklist Item ID passed in the DeleteBlocklistItem event when sent to the networking channel
This commit is contained in:
@@ -89,7 +89,7 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, RadarrDeleteCommand> for RadarrDeleteComm
|
||||
RadarrDeleteCommand::BlocklistItem { blocklist_item_id } => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(RadarrEvent::DeleteBlocklistItem(Some(blocklist_item_id)).into())
|
||||
.handle_network_event(RadarrEvent::DeleteBlocklistItem(blocklist_item_id).into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ mod tests {
|
||||
mock_network
|
||||
.expect_handle_network_event()
|
||||
.with(eq::<NetworkEvent>(
|
||||
RadarrEvent::DeleteBlocklistItem(Some(expected_blocklist_item_id)).into(),
|
||||
RadarrEvent::DeleteBlocklistItem(expected_blocklist_item_id).into(),
|
||||
))
|
||||
.times(1)
|
||||
.returning(|_| {
|
||||
|
||||
@@ -293,9 +293,9 @@ mod tests {
|
||||
)))
|
||||
});
|
||||
let app_arc = Arc::new(Mutex::new(App::default()));
|
||||
let claer_blocklist_command = RadarrCommand::ClearBlocklist;
|
||||
let clear_blocklist_command = RadarrCommand::ClearBlocklist;
|
||||
|
||||
let result = RadarrCliHandler::with(&app_arc, claer_blocklist_command, &mut mock_network)
|
||||
let result = RadarrCliHandler::with(&app_arc, clear_blocklist_command, &mut mock_network)
|
||||
.handle()
|
||||
.await;
|
||||
|
||||
@@ -524,7 +524,7 @@ mod tests {
|
||||
mock_network
|
||||
.expect_handle_network_event()
|
||||
.with(eq::<NetworkEvent>(
|
||||
RadarrEvent::DeleteBlocklistItem(Some(expected_blocklist_item_id)).into(),
|
||||
RadarrEvent::DeleteBlocklistItem(expected_blocklist_item_id).into(),
|
||||
))
|
||||
.times(1)
|
||||
.returning(|_| {
|
||||
|
||||
Reference in New Issue
Block a user