Remove song #64

Merged
phoenix merged 4 commits from remove_song into song_changes 2025-10-11 19:46:00 +00:00
Showing only changes of commit 37a0ca1d70 - Show all commits

View File

@@ -120,7 +120,7 @@ mod song_tests {
} }
#[test] #[test]
fn test_save_song_to_filesystem() { fn test_save_song_to_filesystem_and_remove() {
let mut song = song::Song::default(); let mut song = song::Song::default();
song.directory = utils::get_tests_directory(); song.directory = utils::get_tests_directory();
song.filename = String::from("track02.flac"); song.filename = String::from("track02.flac");
@@ -132,7 +132,15 @@ mod song_tests {
}; };
match song::io::copy_song(&song, &mut copied_song) { match song::io::copy_song(&song, &mut copied_song) {
Ok(_) => {} Ok(_) => {
match copied_song.remove_from_filesystem() {
Ok(_) => {
}
Err(err) => {
assert!(false, "Error: {err:?}")
}
}
}
Err(err) => { Err(err) => {
assert!(false, "Error: {err:?}") assert!(false, "Error: {err:?}")
} }
@@ -142,7 +150,6 @@ mod song_tests {
#[cfg(test)] #[cfg(test)]
mod album_tests { mod album_tests {
use crate::utils; use crate::utils;
use icarus_models::album; use icarus_models::album;