|
@@ -10,7 +10,7 @@ defmodule PodcastFeed.Provider.Archive.ParserTest do
|
|
|
{:ok, json: valid_json, extra: extra}
|
|
|
end
|
|
|
|
|
|
- test "Test that podcast data are correctly converted", state do
|
|
|
+ test "podcast data are correctly converted", state do
|
|
|
%{podcast: podcast} = Parser.parse("incontri-a-piano-terra", Poison.decode!(state[:json]), Poison.decode!(state[:extra]))
|
|
|
assert %{
|
|
|
title: "Incontri a Piano Terra",
|
|
@@ -23,7 +23,7 @@ defmodule PodcastFeed.Provider.Archive.ParserTest do
|
|
|
},
|
|
|
keywords: ["ape milano", "podcast", "montagna"],
|
|
|
pubDate: ~U[2020-05-22 08:30:21Z],
|
|
|
- lastBuildDate: ~U[2020-05-22 08:30:21Z],
|
|
|
+ lastBuildDate: ~U[2020-05-22 15:19:34Z],
|
|
|
author: "APE Milano",
|
|
|
language: "ita",
|
|
|
image: %{
|
|
@@ -37,7 +37,7 @@ defmodule PodcastFeed.Provider.Archive.ParserTest do
|
|
|
} == podcast
|
|
|
end
|
|
|
|
|
|
- test "Test that items data are correctly converted", state do
|
|
|
+ test "items data are correctly converted", state do
|
|
|
%{items: items} = Parser.parse("incontri-a-piano-terra", Poison.decode!(state[:json]), Poison.decode!(state[:extra]))
|
|
|
assert [
|
|
|
%{
|
|
@@ -45,11 +45,13 @@ defmodule PodcastFeed.Provider.Archive.ParserTest do
|
|
|
description: "",
|
|
|
pubDate: ~U[2020-05-22 08:26:29Z],
|
|
|
link: "https://archive.org/download/incontri-a-piano-terra/Confini%20mobili%20sulle%20alpi.mp3",
|
|
|
- length: 390235,
|
|
|
+ length: 3902,
|
|
|
summary: "",
|
|
|
keywords: ["Incontri a Piano Terra", "APE Milano", "podcast"],
|
|
|
explicit: "no",
|
|
|
+ image: "https://archive.org/download/incontri-a-piano-terra/Confini%20mobili%20sulle%20alpi.png",
|
|
|
+ size: "46933494"
|
|
|
}
|
|
|
] == items
|
|
|
end
|
|
|
-end
|
|
|
+end
|