X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Ffeed.t;h=8f19352fdbc273383573ddaae11f5f66c1ddbf9a;hb=3d41aa23f35501ca92aab8aa42980fa73f7fa74f;hp=5dd869aa16107828d6591a7f01b6f2d5b809a7af;hpb=4b313dc74bc9bb84a542b7ec920cdb92879e7523;p=public-inbox.git
diff --git a/t/feed.t b/t/feed.t
index 5dd869aa..8f19352f 100644
--- a/t/feed.t
+++ b/t/feed.t
@@ -1,5 +1,5 @@
-# Copyright (C) 2014-2015 all contributors
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2014-2018 all contributors
+# License: AGPL-3.0+
use strict;
use warnings;
use Test::More;
@@ -11,7 +11,7 @@ use PublicInbox::Config;
use PublicInbox::Inbox;
use File::Temp qw/tempdir/;
my $have_xml_feed = eval { require XML::Feed; 1 };
-require 't/common.perl';
+require './t/common.perl';
sub string_feed {
stream_to_string(PublicInbox::Feed::generate($_[0]));
@@ -43,10 +43,10 @@ my $tmpdir = tempdir('pi-feed-XXXXXX', TMPDIR => 1, CLEANUP => 1);
my $git_dir = "$tmpdir/gittest";
my $ibx = PublicInbox::Inbox->new({
address => 'test@example',
- -primary_address => 'test@example',
name => 'testbox',
mainrepo => $git_dir,
url => 'http://example.com/test',
+ feedmax => 3,
});
my $git = $ibx->git;
my $im = PublicInbox::Import->new($git, $ibx->{name}, 'test@example');
@@ -102,10 +102,7 @@ EOF
{
# check initial feed
{
- my $feed = string_feed({
- -inbox => $ibx,
- max => 3
- });
+ my $feed = string_feed({ -inbox => $ibx });
SKIP: {
skip 'XML::Feed missing', 2 unless $have_xml_feed;
my $p = XML::Feed->parse(\$feed);
@@ -143,10 +140,7 @@ EOF
# check spam shows up
{
- my $spammy_feed = string_feed({
- -inbox => $ibx,
- max => 3
- });
+ my $spammy_feed = string_feed({ -inbox => $ibx });
SKIP: {
skip 'XML::Feed missing', 2 unless $have_xml_feed;
my $p = XML::Feed->parse(\$spammy_feed);
@@ -168,7 +162,7 @@ EOF
# spam no longer shows up
{
- my $feed = string_feed({ -inbox => $ibx, max => 3 });
+ my $feed = string_feed({ -inbox => $ibx });
SKIP: {
skip 'XML::Feed missing', 2 unless $have_xml_feed;
my $p = XML::Feed->parse(\$feed);