hammond-data/src/feed.rs api changes.

This commit is contained in:
Jordan Petridis
2017-11-23 18:48:41 +02:00
parent a58671ea9a
commit aa7c493e81
7 changed files with 132 additions and 35 deletions
+7 -2
View File
@@ -193,6 +193,7 @@ pub fn cache_image(pd: &Podcast) -> Option<String> {
mod tests {
use super::*;
use hammond_data::Source;
use hammond_data::dbqueries;
use std::fs;
@@ -205,13 +206,17 @@ mod tests {
#[test]
fn test_cache_image() {
let pd = Source::from_url("http://www.newrustacean.com/feed.xml")
let url = "http://www.newrustacean.com/feed.xml";
Source::from_url(url)
.unwrap()
.into_feed()
.unwrap()
.get_podcast()
.index()
.unwrap();
let pd = dbqueries::get_podcast_from_title("New Rustacean").unwrap();
let img_path = cache_image(&pd);
let foo_ = format!(
"{}{}/cover.png",