]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_v2.t
feed: fix new.html for v2
[public-inbox.git] / t / psgi_v2.t
index 738979855cf325bf4f117c193767dee5e066f24d..1e45c2633a6bc36576ad27ee41857edd4e694925 100644 (file)
@@ -78,6 +78,12 @@ test_psgi(sub { $www->call(@_) }, sub {
        my @bodies = ($res->content =~ />(hello [^<]+)</mg);
        is_deeply(\@bodies, [ "hello world!\n", "hello world\n" ],
                'Atom ordering is chronological');
+
+       # new.html should sort by Date:, too (if Received is missing)
+       $res = $cb->(GET('/v2test/new.html'));
+       @bodies = ($res->content =~ /^(hello [^<]+)$/mg);
+       is_deeply(\@bodies, [ "hello world!\n", "hello world\n" ],
+               'new.html ordering is chronological');
 });
 
 $mime->header_set('Message-Id', 'a-mid@b');