Added full support for managing the blocklist

This commit is contained in:
2024-02-15 16:20:03 -07:00
parent d869647dd8
commit 6cadf70c1e
42 changed files with 2004 additions and 123 deletions
+17
View File
@@ -12,6 +12,23 @@ mod tests {
use crate::network::radarr_network::RadarrEvent;
use crate::network::NetworkEvent;
#[tokio::test]
async fn test_dispatch_by_blocklist_block() {
let (mut app, mut sync_network_rx) = construct_app_unit();
app
.dispatch_by_radarr_block(&ActiveRadarrBlock::Blocklist)
.await;
assert!(app.is_loading);
assert_eq!(
sync_network_rx.recv().await.unwrap(),
RadarrEvent::GetBlocklist.into()
);
assert!(!app.data.radarr_data.prompt_confirm);
assert_eq!(app.tick_count, 0);
}
#[tokio::test]
async fn test_dispatch_by_collections_block() {
let (mut app, mut sync_network_rx) = construct_app_unit();