getRssFeedItems for StoryArchive, with tests.
A couple of quick rss/atom url tests.
This commit is contained in:
parent
3853e4dd02
commit
efef611b03
2 changed files with 68 additions and 5 deletions
|
|
@ -58,11 +58,11 @@ $canPostMaker->prepare({
|
|||
fail => [1, $reader ],
|
||||
});
|
||||
|
||||
my $tests = 1;
|
||||
plan tests => 28
|
||||
+ $tests
|
||||
+ $canPostMaker->plan
|
||||
;
|
||||
my $tests = 31
|
||||
+ $canPostMaker->plan
|
||||
;
|
||||
plan tests => 1
|
||||
+ $tests;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# put your tests here
|
||||
|
|
@ -387,6 +387,45 @@ cmp_bag(
|
|||
'keywordCloud template variable has keywords and correct links',
|
||||
);
|
||||
|
||||
################################################################
|
||||
#
|
||||
# RSS and Atom checks
|
||||
#
|
||||
################################################################
|
||||
|
||||
is($archive->getRssFeedUrl, '/home/mystories?func=viewRss', 'RSS Feed Url');
|
||||
is($archive->getAtomFeedUrl, '/home/mystories?func=viewAtom', 'Atom Feed Url');
|
||||
|
||||
$archive->update({itemsPerFeed => 3});
|
||||
|
||||
cmp_deeply(
|
||||
$archive->getRssFeedItems(),
|
||||
[
|
||||
{
|
||||
title => 'First Story',
|
||||
description => ignore(),
|
||||
'link' => ignore(),
|
||||
date => ignore(),
|
||||
author => ignore(),
|
||||
},
|
||||
{
|
||||
title => 'Story 2',
|
||||
description => ignore(),
|
||||
'link' => ignore(),
|
||||
date => ignore(),
|
||||
author => ignore(),
|
||||
},
|
||||
{
|
||||
title => 'Story 3',
|
||||
description => ignore(),
|
||||
'link' => ignore(),
|
||||
date => ignore(),
|
||||
author => ignore(),
|
||||
},
|
||||
],
|
||||
'rssFeedItems'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue