Remove song (#64)
Some checks failed
Release Tagging / release (pull_request) Successful in 33s
Rust Build / Check (pull_request) Successful in 43s
Rust Build / Test Suite (pull_request) Successful in 44s
Rust Build / Rustfmt (pull_request) Successful in 32s
Rust Build / Clippy (pull_request) Failing after 32s
Rust Build / build (pull_request) Successful in 38s

Reviewed-on: #64
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
2025-10-11 19:46:00 +00:00
committed by phoenix
parent 0637a9432e
commit c263cedf28
4 changed files with 27 additions and 8 deletions

View File

@@ -120,7 +120,7 @@ mod song_tests {
}
#[test]
fn test_save_song_to_filesystem() {
fn test_save_song_to_filesystem_and_remove() {
let mut song = song::Song::default();
song.directory = utils::get_tests_directory();
song.filename = String::from("track02.flac");
@@ -132,7 +132,12 @@ mod song_tests {
};
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) => {
assert!(false, "Error: {err:?}")
}
@@ -142,7 +147,6 @@ mod song_tests {
#[cfg(test)]
mod album_tests {
use crate::utils;
use icarus_models::album;