From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B8EE121419 for ; Fri, 4 Jan 2019 13:10:41 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/6] t/cgi.t: remove atom.xml test Date: Fri, 4 Jan 2019 13:10:35 +0000 Message-Id: <20190104131038.32233-4-e@80x24.org> In-Reply-To: <20190104131038.32233-1-e@80x24.org> References: <20190104131038.32233-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It is redundant with what is in t/plack.t --- t/cgi.t | 12 ------------ t/plack.t | 7 +++++-- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/t/cgi.t b/t/cgi.t index 06519c3..382c21f 100644 --- a/t/cgi.t +++ b/t/cgi.t @@ -109,18 +109,6 @@ EOF is($res->{body}, substr($orig, 5), 'partial body OK past end'); } -# atom feeds -{ - local $ENV{HOME} = $home; - my $res = cgi_run("/test/atom.xml"); - like($res->{body}, qr/test for public-inbox/, - "set title in XML feed"); - like($res->{body}, - qr!http://test\.example\.com/test/blah\@example\.com/!, - "link id set"); - like($res->{body}, qr/what\?/, "reply included"); -} - # message-id pages { local $ENV{HOME} = $home; diff --git a/t/plack.t b/t/plack.t index 70cd20e..1a719b4 100644 --- a/t/plack.t +++ b/t/plack.t @@ -135,9 +135,12 @@ EOF my ($cb) = @_; my $res = $cb->(GET($pfx . '/atom.xml')); is(200, $res->code, 'success response received for atom'); - like($res->content, - qr!link\s+href="\Q$pfx\E/blah\@example\.com/"!s, + my $body = $res->content; + like($body, qr!link\s+href="\Q$pfx\E/blah\@example\.com/"!s, 'atom feed generated correct URL'); + like($body, qr/<title>test for public-inbox/, + "set title in XML feed"); + like($body, qr/zzzzzz/, 'body included'); }); test_psgi($app, sub { -- EW