feat(handlers): Sonarr key support for the Series table
This commit is contained in:
@@ -228,48 +228,4 @@ mod utils {
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_delete_prompt {
|
||||
($block:expr, $expected_block:expr) => {
|
||||
let mut app = App::default();
|
||||
|
||||
RadarrHandler::with(DELETE_KEY, &mut app, $block, None).handle();
|
||||
|
||||
assert_eq!(app.get_current_route(), $expected_block.into());
|
||||
};
|
||||
|
||||
($handler:ident, $block:expr, $expected_block:expr) => {
|
||||
let mut app = App::default();
|
||||
|
||||
$handler::with(DELETE_KEY, &mut app, $block, None).handle();
|
||||
|
||||
assert_eq!(app.get_current_route(), $expected_block.into());
|
||||
};
|
||||
|
||||
($app:expr, $block:expr, $expected_block:expr) => {
|
||||
RadarrHandler::with(DELETE_KEY, &mut $app, $block, None).handle();
|
||||
|
||||
assert_eq!($app.get_current_route(), $expected_block.into());
|
||||
};
|
||||
|
||||
($handler:ident, $app:expr, $block:expr, $expected_block:expr) => {
|
||||
$handler::with(DELETE_KEY, &mut $app, $block, None).handle();
|
||||
|
||||
assert_eq!($app.get_current_route(), $expected_block.into());
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! assert_refresh_key {
|
||||
($handler:ident, $block:expr) => {
|
||||
let mut app = App::default();
|
||||
app.push_navigation_stack($block.into());
|
||||
|
||||
$handler::with(DEFAULT_KEYBINDINGS.refresh.key, &mut app, $block, None).handle();
|
||||
|
||||
assert_eq!(app.get_current_route(), $block.into());
|
||||
assert!(app.should_refresh);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user