X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fsolver_git.t;h=89ed03626673c459661427e88b108299ae9580df;hb=20ab293a131f0ec228932bf3448d1b09e280672b;hp=8222203162489fb5082aa4792644915f166c0dfe;hpb=c4b882036d272cc276cbf3a0d108244893c3c8af;p=public-inbox.git diff --git a/t/solver_git.t b/t/solver_git.t index 82222031..89ed0362 100644 --- a/t/solver_git.t +++ b/t/solver_git.t @@ -364,6 +364,23 @@ EOF $fn = 'public-inbox-1.0.0.tar.bz2'; $res = $cb->(GET("/public-inbox/snapshot/$fn")); is($res->code, 404, '404 on unconfigured snapshot format'); + + $res = $cb->(GET('/public-inbox/atom/')); + is($res->code, 200, 'Atom feed'); + SKIP: { + require_mods('XML::TreePP', 1); + my $t = XML::TreePP->new->parse($res->content); + is(scalar @{$t->{feed}->{entry}}, 50, + 'got 50 entries'); + + $res = $cb->(GET('/public-inbox/atom/COPYING')); + is($res->code, 200, 'file Atom feed'); + $t = XML::TreePP->new->parse($res->content); + ok($t->{feed}->{entry}, 'got entry'); + + $res = $cb->(GET('/public-inbox/atom/README.md')); + is($res->code, 404, '404 on non-existent file Atom feed'); + } }; test_psgi(sub { $www->call(@_) }, $client); my $env = { PI_CONFIG => $cfgpath, TMPDIR => $tmpdir };