diff --git a/t/Asset/Wobject/SyndicatedContent.t b/t/Asset/Wobject/SyndicatedContent.t index 7cce86dd8..84fb34d2d 100644 --- a/t/Asset/Wobject/SyndicatedContent.t +++ b/t/Asset/Wobject/SyndicatedContent.t @@ -20,7 +20,7 @@ use Data::Dumper; use WebGUI::Test; use WebGUI::Session; -use Test::More tests => 21; # increment this value for each test you create +use Test::More tests => 22; # increment this value for each test you create use Test::Deep; use WebGUI::Asset::Wobject::SyndicatedContent; use XML::FeedPP; @@ -173,3 +173,34 @@ cmp_deeply( ); $cache->delete; + +#################################################################### +# +# Odd feeds +# +#################################################################### + + +##Feed with no links or pubDates. +my $oncpUrl = 'http://www.oncp.gob.ve/oncp.xml'; +$syndicated_content->update({ + rssUrl => $oncpUrl, + hasTerms => '', + maxHeadlines => 50, +}); + +my $cache = WebGUI::Cache->new($session, $oncpUrl, 'RSS'); +open my $rssFile, '<', WebGUI::Test->getTestCollateralPath('oncp.xml') + or die "Unable to get RSS file: oncp.xml"; +my $rssContent = do { local $/; <$rssFile>; }; +close $rssFile; +$cache->set($rssContent, 60); + +my $oddFeed1 = $syndicated_content->generateFeed(); + +my @oddItems = $oddFeed1->get_item(); +is (@oddItems, 13, 'feed has items even without pubDates or links'); + +$cache->delete; + + diff --git a/t/supporting_collateral/oncp.xml b/t/supporting_collateral/oncp.xml new file mode 100644 index 000000000..7e5abe22a --- /dev/null +++ b/t/supporting_collateral/oncp.xml @@ -0,0 +1,95 @@ + + + <![CDATA[Oficina Nacional de Crédito Público]]> + http://www.oncp.gob.ve + Información Financiera + es-ve + Oficina Nacional de Crédito Público - 2009 + + Oficina Nacional de Crédito Público + http://www.oncp.gob.ve/data/themes/digital//banner/oncp.png + http://www.oncp.gob.ve + + + + <![CDATA[Deuda Interna I Sem 09 / MM US$ 20.441]]> + http://www.oncp.gob.ve + + http://www.oncp.gob.ve + + + + <![CDATA[Deuda Externa I Sem 09 / MM US$ 29.894]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Tasa Pasiva / 14,52%]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Tasa Activa / 19,56%]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Variación PIB II Trimestre / -2,4%]]> + http://www.oncp.gob.ve + + + + + <![CDATA[PIB II Trimestre 2009 / M BsF 13.979.77]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Unidad Tributaria / BsF. 55,00]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Cesta Venezolana / US$ 65,32]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Cesta OPEP / US$ 67,92]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Variación Acumuladaa / 15,6%]]> + http://www.oncp.gob.ve + + + + + <![CDATA[IPC Variación Agosto 2009 / 2,2%]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Reservas Internacionales con BCV + FEM / MM US$ 33.213 (32.384 + 829)]]> + http://www.oncp.gob.ve + + + + + <![CDATA[Variación Acumulada / 15,6%]]> + http://www.oncp.gob.ve + + + + + +