Added unit tests for the add_movie_handler and added an additional test to radarr handles to ensure proper delegation. Also added a few macros for testing scrolling and home/end in all handlers to make life easier for those tests.
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ impl App {
|
||||
|
||||
pub fn handle_error(&mut self, error: anyhow::Error) {
|
||||
if self.error.text.is_empty() {
|
||||
self.error = HorizontallyScrollableText::new(error.to_string());
|
||||
self.error = error.to_string().into();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -413,7 +413,7 @@ mod radarr_data_tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rest_search() {
|
||||
fn test_reset_search() {
|
||||
let mut radarr_data = RadarrData {
|
||||
is_searching: true,
|
||||
search: "test search".to_owned(),
|
||||
|
||||
Reference in New Issue
Block a user