X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpsgi_v2.t;h=2c9387a496cb0d16b31019bf2297d12ecba3d834;hb=c29b2b7ded47def906cf00e3baad65c102304120;hp=fdd6969f8034322a4e2fcffde8e5627e6d164c7d;hpb=bf4d35dd2f6389e9aa4dc87fdfaef801fa5b9108;p=public-inbox.git diff --git a/t/psgi_v2.t b/t/psgi_v2.t index fdd6969f..2c9387a4 100644 --- a/t/psgi_v2.t +++ b/t/psgi_v2.t @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2019 all contributors +# Copyright (C) 2018-2020 all contributors # License: AGPL-3.0+ use strict; use warnings; @@ -160,11 +160,11 @@ test_psgi(sub { $www->call(@_) }, sub { $res = $cb->(GET('/v2test/?q=m:a-mid@b&x=A')); is($res->code, 200, 'success with Atom search'); SKIP: { - require_mods(qw(XML::Feed), 2); - $raw = $res->content; - my $p = XML::Feed->parse(\$raw); - is($p->format, "Atom", "parsed atom feed"); - is(scalar $p->entries, 3, "parsed three entries"); + require_mods(qw(XML::TreePP), 2); + my $t = XML::TreePP->new->parse($res->content); + like($t->{feed}->{-xmlns}, qr/\bAtom\b/, + 'looks like an an Atom feed'); + is(scalar @{$t->{feed}->{entry}}, 3, 'parsed three entries'); }; local $SIG{__WARN__} = 'DEFAULT';