From 6e1589df66857f4dd75e08e8444da2a5db8cd098 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Apr 2014 03:02:01 +0000 Subject: cgi: implement get_mid_txt This is essential when telling people to use something like: curl $URL | git am --- t/cgi.t | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 't') diff --git a/t/cgi.t b/t/cgi.t index 3ba74f30..a19f2cf1 100644 --- a/t/cgi.t +++ b/t/cgi.t @@ -122,6 +122,16 @@ EOF # more checks in t/feed.t } + +{ + local $ENV{HOME} = $home; + my $res = cgi_run("/test/m/blahblah\@example.com.txt"); + like($res->{body}, qr/Message-Id: /, + "mid.txt hit"); + $res = cgi_run("/test/m/blahblah\@example.con.txt"); + like($res->{head}, qr/Status: 404 Not Found/, "mid.txt miss"); +} + done_testing(); sub run_with_env { -- cgit v1.2.3-24-ge0c7