From 88cc7e6fecdaab56e25242e65e39f96d2f33ed8a Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Thu, 29 Mar 2018 09:21:49 +0300 Subject: [PATCH] Fix set_image_from_path test --- hammond-gtk/src/utils.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hammond-gtk/src/utils.rs b/hammond-gtk/src/utils.rs index 5c332d9..5c6c70f 100644 --- a/hammond-gtk/src/utils.rs +++ b/hammond-gtk/src/utils.rs @@ -253,7 +253,7 @@ mod tests { // This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit // to run it. #[ignore] - fn test_get_pixbuf_from_path() { + fn test_set_image_from_path() { let url = "https://web.archive.org/web/20180120110727if_/https://rss.acast.com/thetipoff"; // Create and index a source let source = Source::from_url(url).unwrap(); @@ -262,8 +262,9 @@ mod tests { pipeline::run(vec![source], true).unwrap(); // Get the Podcast - let pd = dbqueries::get_podcast_from_source_id(sid).unwrap(); - let pxbuf = get_pixbuf_from_path(&pd.into(), 256); + let img = gtk::Image::new(); + let pd = dbqueries::get_podcast_from_source_id(sid).unwrap().into(); + let pxbuf = set_image_from_path(&img, Arc::new(pd), 256); assert!(pxbuf.is_ok()); }