Ui unit tests
This commit is contained in:
parent
dd3633cd5f
commit
cb09f47eb2
@ -253,12 +253,14 @@ mod tests {
|
||||
fn artist_matches(matching: ArtistMeta, list: Vec<Match<ArtistMeta>>) -> MatchStateInfo {
|
||||
let mut list: Vec<MatchOption<ArtistMeta>> = list.into_iter().map(Into::into).collect();
|
||||
list.push(MatchOption::CannotHaveMbid);
|
||||
list.push(MatchOption::ManualInputMbid);
|
||||
MatchStateInfo::artist(matching, list)
|
||||
}
|
||||
|
||||
fn album_matches(matching: AlbumMeta, list: Vec<Match<AlbumMeta>>) -> MatchStateInfo {
|
||||
let mut list: Vec<MatchOption<AlbumMeta>> = list.into_iter().map(Into::into).collect();
|
||||
list.push(MatchOption::CannotHaveMbid);
|
||||
list.push(MatchOption::ManualInputMbid);
|
||||
MatchStateInfo::album(matching, list)
|
||||
}
|
||||
|
||||
@ -380,6 +382,10 @@ mod tests {
|
||||
input: None,
|
||||
};
|
||||
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||
|
||||
let input = tui_input::Input::default();
|
||||
app.input = Some(&input);
|
||||
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -415,5 +421,9 @@ mod tests {
|
||||
input: None,
|
||||
};
|
||||
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||
|
||||
let input = tui_input::Input::default();
|
||||
app.input = Some(&input);
|
||||
terminal.draw(|frame| Ui::render(&mut app, frame)).unwrap();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user