mirror of
https://github.com/talwat/lowfi
synced 2025-12-07 23:47:46 +00:00
chore: remove useless tests
This commit is contained in:
parent
95ce4f2352
commit
ebce85cae9
@ -1,4 +1,3 @@
|
||||
mod bookmark;
|
||||
mod player;
|
||||
mod tracks;
|
||||
mod ui;
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
#[cfg(test)]
|
||||
mod current {
|
||||
use crate::player::Current;
|
||||
use std::time::Duration;
|
||||
|
||||
fn test_info(path: &str, display: &str) -> crate::tracks::Info {
|
||||
crate::tracks::Info {
|
||||
path: path.into(),
|
||||
display: display.into(),
|
||||
width: display.len(),
|
||||
duration: Some(Duration::from_secs(180)),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_is_loading() {
|
||||
let c = Current::default();
|
||||
assert!(c.loading());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn track_is_not_loading() {
|
||||
let info = test_info("x.mp3", "Track X");
|
||||
let c = Current::Track(info);
|
||||
assert!(!c.loading());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn loading_without_progress() {
|
||||
let c = Current::Loading(None);
|
||||
assert!(c.loading());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn current_clone_works() {
|
||||
let info = test_info("p.mp3", "P");
|
||||
let c1 = Current::Track(info);
|
||||
let c2 = c1.clone();
|
||||
assert!(!c2.loading());
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user