Test works
All checks were successful
Rust Build / Check (pull_request) Successful in 26s
Rust Build / Test Suite (pull_request) Successful in 28s
Rust Build / Rustfmt (pull_request) Successful in 29s
Rust Build / Clippy (pull_request) Successful in 27s
Rust Build / build (pull_request) Successful in 25s
All checks were successful
Rust Build / Check (pull_request) Successful in 26s
Rust Build / Test Suite (pull_request) Successful in 28s
Rust Build / Rustfmt (pull_request) Successful in 29s
Rust Build / Clippy (pull_request) Successful in 27s
Rust Build / build (pull_request) Successful in 25s
This commit is contained in:
@@ -155,14 +155,27 @@ mod song_tests {
|
||||
mod album_tests {
|
||||
|
||||
use crate::utils;
|
||||
use icarus_models::album::collection::Album;
|
||||
use icarus_models::album;
|
||||
|
||||
#[test]
|
||||
fn parse_album() {
|
||||
let test_dir = utils::get_tests_directory();
|
||||
if utils::does_directory_exists(&test_dir) {
|
||||
let album = Album::default();
|
||||
println!("Album title: {}", album.title);
|
||||
let album_file: String = test_dir + &String::from("album.json");
|
||||
println!("Album file: {:?}", album_file);
|
||||
|
||||
// let album = Album::default();
|
||||
match album::collection::parse_album(&album_file) {
|
||||
Ok(album) => {
|
||||
println!("Album title: {}", album.title);
|
||||
assert_eq!(album.title.is_empty(), false);
|
||||
assert_eq!(album.artist.is_empty(), false);
|
||||
assert_eq!(album.tracks.is_empty(), false);
|
||||
}
|
||||
Err(err) => {
|
||||
assert!(false, "Error parsing album json file: {:?}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user