Fixed rustfmt issues
This commit is contained in:
@@ -7,9 +7,11 @@ mod tests {
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, MOVIE_DETAILS_BLOCKS};
|
||||
use crate::ui::radarr_ui::library::movie_details_ui::{decorate_peer_style, MovieDetailsUi, style_from_download_status};
|
||||
use crate::ui::DrawUi;
|
||||
use crate::ui::radarr_ui::library::movie_details_ui::{
|
||||
decorate_peer_style, style_from_download_status, MovieDetailsUi,
|
||||
};
|
||||
use crate::ui::styles::ManagarrStyle;
|
||||
use crate::ui::DrawUi;
|
||||
|
||||
#[test]
|
||||
fn test_movie_details_ui_accepts() {
|
||||
@@ -21,7 +23,7 @@ mod tests {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#[rstest]
|
||||
#[case("Downloading", true, "", Style::new().downloading())]
|
||||
#[case("Downloaded", true, "", Style::new().downloaded())]
|
||||
@@ -36,9 +38,12 @@ mod tests {
|
||||
#[case] movie_status: &str,
|
||||
#[case] expected_style: Style,
|
||||
) {
|
||||
assert_eq!(style_from_download_status(download_status, is_monitored, movie_status.to_owned()), expected_style);
|
||||
assert_eq!(
|
||||
style_from_download_status(download_status, is_monitored, movie_status.to_owned()),
|
||||
expected_style
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
#[rstest]
|
||||
#[case(0, 0, PeerStyle::Failure)]
|
||||
#[case(1, 2, PeerStyle::Warning)]
|
||||
@@ -50,12 +55,21 @@ mod tests {
|
||||
) {
|
||||
let text = Text::from("test");
|
||||
match expected_style {
|
||||
PeerStyle::Failure => assert_eq!(decorate_peer_style(seeders, leechers, text.clone()), text.failure()),
|
||||
PeerStyle::Warning => assert_eq!(decorate_peer_style(seeders, leechers, text.clone()), text.warning()),
|
||||
PeerStyle::Success => assert_eq!(decorate_peer_style(seeders, leechers, text.clone()), text.success()),
|
||||
PeerStyle::Failure => assert_eq!(
|
||||
decorate_peer_style(seeders, leechers, text.clone()),
|
||||
text.failure()
|
||||
),
|
||||
PeerStyle::Warning => assert_eq!(
|
||||
decorate_peer_style(seeders, leechers, text.clone()),
|
||||
text.warning()
|
||||
),
|
||||
PeerStyle::Success => assert_eq!(
|
||||
decorate_peer_style(seeders, leechers, text.clone()),
|
||||
text.success()
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum PeerStyle {
|
||||
Failure,
|
||||
Warning,
|
||||
|
||||
Reference in New Issue
Block a user