From 5ab011438e9c6389fd45287625a28fcd12858e02 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 4 Aug 2023 07:47:54 +0100 Subject: [PATCH] added mock_network_download_as_mp3 --- src/test_utils.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test_utils.rs b/src/test_utils.rs index 95dd3b2..ca5286c 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -69,6 +69,10 @@ pub fn mock_file_open(real_paths: Vec) -> FileOpenFn { }) } +pub fn mock_network_download_as_mp3() -> NetworkDownloadAsMp3Fn { + Box::new(|_url| Ok(())) +} + pub fn stub_network_fetch_as_bytes() -> NetworkFetchAsBytesFn { Box::new(|url: &str| { Err(Error::message(