Move test
This commit is contained in:
parent
086f1935ac
commit
349332bd89
@ -166,13 +166,6 @@ mod tests {
|
|||||||
app.unwrap_search();
|
app.unwrap_search();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn fetch_musicbrainz_no_artist() {
|
|
||||||
let browse = AppMachine::browse(inner(music_hoard(vec![])));
|
|
||||||
let app = browse.fetch_musicbrainz();
|
|
||||||
app.unwrap_error();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn fetch_musicbrainz() {
|
fn fetch_musicbrainz() {
|
||||||
let mb_api = MockIMusicBrainz::new();
|
let mb_api = MockIMusicBrainz::new();
|
||||||
|
@ -199,7 +199,7 @@ mod tests {
|
|||||||
use crate::tui::{
|
use crate::tui::{
|
||||||
app::{
|
app::{
|
||||||
machine::tests::{inner, music_hoard},
|
machine::tests::{inner, music_hoard},
|
||||||
AppAlbumMatches, AppArtistMatches,
|
AppAlbumMatches, AppArtistMatches, IAppInteract,
|
||||||
},
|
},
|
||||||
event::EventReceiver,
|
event::EventReceiver,
|
||||||
lib::interface::musicbrainz::{self, Match, MockIMusicBrainz},
|
lib::interface::musicbrainz::{self, Match, MockIMusicBrainz},
|
||||||
@ -209,6 +209,12 @@ mod tests {
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn fetch_no_artist() {
|
||||||
|
let app = AppMachine::app_fetch_new(inner(music_hoard(vec![])));
|
||||||
|
assert!(matches!(app.state(), AppState::Error(_)));
|
||||||
|
}
|
||||||
|
|
||||||
fn event_channel() -> (EventSender, EventReceiver) {
|
fn event_channel() -> (EventSender, EventReceiver) {
|
||||||
let event_channel = EventChannel::new();
|
let event_channel = EventChannel::new();
|
||||||
let events_tx = event_channel.sender();
|
let events_tx = event_channel.sender();
|
||||||
|
Loading…
Reference in New Issue
Block a user