[dw-free] Add comment image to RSS feed
[commit: http://hg.dwscoalition.org/dw-free/rev/8ab23737dca8]
http://bugs.dwscoalition.org/show_bug.cgi?id=2028
Fix tests.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2028
Fix tests.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- t/feed-atom.t
-------------------------------------------------------------------------------- diff -r 619352340c84 -r 8ab23737dca8 t/feed-atom.t --- a/t/feed-atom.t Thu Aug 25 16:57:38 2011 +0800 +++ b/t/feed-atom.t Thu Aug 25 19:00:22 2011 +0800 @@ -16,6 +16,10 @@ HTTP::Request->new( GET => $u->journal_base . "/data/atom" ) ); my $site_ns = lc $LJ::SITENAMEABBREV; +sub event_with_commentimage { + my $e = $_[0]; + return $e->event_raw . "<br /><br />" . $e->comment_imgtag . " comments"; +} note( "Empty feed" ); { @@ -55,13 +59,13 @@ is_deeply( $feed->{items}, [{ link => $e2->url, subject => $e2->subject_raw, - text => $e2->event_raw, + text => event_with_commentimage( $e2 ), time => substr( $e2->eventtime_mysql, 0, -3 ), author => $u->name_raw, }, { link => $e1->url, subject => $e1->subject_raw, - text => $e1->event_raw, + text => event_with_commentimage( $e1 ), time => substr( $e1->eventtime_mysql, 0, -3 ), author => $u->name_raw, }], "Check entries from feed" ); @@ -78,7 +82,7 @@ is_deeply( $feed->{items}->[0], { link => $e2->url, subject => $e2->subject_raw, - text => $e2->event_raw, + text => event_with_commentimage( $e2 ), time => substr( $e2->eventtime_mysql, 0, -3 ), author => $u->name_raw, }, "Check individual entry from feed" ); @@ -136,13 +140,13 @@ is_deeply( $feed->{items}, [{ link => $e2->url, subject => $e2->subject_raw, - text => $e2->event_raw, + text => event_with_commentimage( $e2 ), time => substr( $e2->eventtime_mysql, 0, -3 ), author => $u->name_raw, }, { link => $e1->url, subject => $e1->subject_raw, - text => $e1->event_raw, + text => event_with_commentimage( $e1 ), time => substr( $e1->eventtime_mysql, 0, -3 ), author => $u->name_raw, }], "Check entries from feed" ); --------------------------------------------------------------------------------