Author: nick Date: 2006-06-14 18:43:03 +0100 (Wed, 14 Jun 2006) New Revision: 808
Modified: trunk/t/22_feed_recent_changes.t trunk/t/23_feed_node_all_versions.t Log: Check to ensure the feed type turns up in the feed (should spot when we invert atom and rss, for example)
Modified: trunk/t/22_feed_recent_changes.t =================================================================== --- trunk/t/22_feed_recent_changes.t 2006-06-14 17:41:53 UTC (rev 807) +++ trunk/t/22_feed_recent_changes.t 2006-06-14 17:43:03 UTC (rev 808) @@ -21,7 +21,7 @@
# Which feed types do we test? my @feed_types = qw( rss atom ); -plan tests => 7 * scalar @feed_types; +plan tests => 8 * scalar @feed_types;
foreach my $feed_type (@feed_types) { @@ -50,9 +50,13 @@ my $feed = OpenGuides::Feed->new( wiki => $wiki, config => $config );
- my $rss = eval { $feed->make_feed(feed_type => $feed_type, feed_listing => 'recent_changes'); }; + my $feed_output = eval { $feed->make_feed(feed_type => $feed_type, feed_listing => 'recent_changes'); }; is( $@, "", "->make_feed for $feed_type doesn't croak" );
+ # Ensure that the feed actually contained rss/atom (a good guide + # that we actually got the right feed) + like( $feed_output, "/$feed_type/i", "Does contain the feed type" ); + # Now write some data, first a minor edit then a non-minor one. my $guide = OpenGuides->new( config => $config );
Modified: trunk/t/23_feed_node_all_versions.t =================================================================== --- trunk/t/23_feed_node_all_versions.t 2006-06-14 17:41:53 UTC (rev 807) +++ trunk/t/23_feed_node_all_versions.t 2006-06-14 17:43:03 UTC (rev 808) @@ -21,7 +21,7 @@
# Which feed types do we test? my @feed_types = qw( rss atom ); -plan tests => 10 * scalar @feed_types; +plan tests => 11 * scalar @feed_types;
foreach my $feed_type (@feed_types) { @@ -50,10 +50,14 @@ my $feed = OpenGuides::Feed->new( wiki => $wiki, config => $config );
- my $rss = eval { $feed->make_feed(feed_type => $feed_type, feed_listing => 'recent_changes'); }; + my $feed_output = eval { $feed->make_feed(feed_type => $feed_type, feed_listing => 'recent_changes'); }; is( $@, "", "->make_feed for $feed_type doesn't croak" );
+ # Ensure that the feed actually contained rss/atom (a good guide + # that we actually got the right feed) + like( $feed_output, "/$feed_type/i", "Does contain the feed type" );
+ # Now write some data: 3 versions of one node, and 1 of another my $guide = OpenGuides->new( config => $config );