X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpsgi_v2.t;h=e057068226ac0eac778ec6cb82cea85ec38c8656;hb=97510d7a92b4e44318d1917a54c70d536bbf46f2;hp=1f19070894571eef0dea0650b06e4718016ea775;hpb=9f02576da775abf208f5a03c03b6f7abd72596d0;p=public-inbox.git diff --git a/t/psgi_v2.t b/t/psgi_v2.t index 1f190708..e0570682 100644 --- a/t/psgi_v2.t +++ b/t/psgi_v2.t @@ -9,7 +9,7 @@ use PublicInbox::Eml; use PublicInbox::Config; use PublicInbox::MID qw(mids); require_mods(qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test - URI::Escape Plack::Builder)); + URI::Escape Plack::Builder HTTP::Date)); use_ok($_) for (qw(HTTP::Request::Common Plack::Test)); use_ok 'PublicInbox::WWW'; my ($tmpdir, $for_destroy) = tmpdir(); @@ -113,6 +113,14 @@ $im->done; my $client1 = sub { my ($cb) = @_; + $res = $cb->(GET('/v2test/_/text/config/raw')); + my $lm = $res->header('Last-Modified'); + ok($lm, 'Last-Modified set w/ ->mm'); + $lm = HTTP::Date::str2time($lm); + is($lm, $ibx->mm->created_at, + 'Last-Modified for text/config/raw matches ->created_at'); + delete $ibx->{mm}; + $res = $cb->(GET("/v2test/$third/raw")); $raw = $res->content; like($raw, qr/^hello ghosts$/m, 'got third message');