diff options
author | Eric Wong <e@80x24.org> | 2023-01-03 11:35:15 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-01-04 19:46:02 +0000 |
commit | a30dd4aa9455f4166c6bc18e043fccd645b4231c (patch) | |
tree | 93bd2cf64f85572bf69245a49ec1d0d32c645171 /t/solver_git.t | |
parent | d4ba8828ab23f2785be54493495bbf7e1d62c0b0 (diff) | |
download | public-inbox-a30dd4aa9455f4166c6bc18e043fccd645b4231c.tar.gz |
This should be similar or identical to what's in cgit; and tie into the rest of the www_coderepo stuff.
Diffstat (limited to 't/solver_git.t')
-rw-r--r-- | t/solver_git.t | 17 |
1 files changed, 17 insertions, 0 deletions
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 }; |