about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/cgi.t2
-rw-r--r--t/plack.t19
2 files changed, 20 insertions, 1 deletions
diff --git a/t/cgi.t b/t/cgi.t
index e87f7dca..020dfe7e 100644
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -183,7 +183,7 @@ EOF
 {
         local $ENV{HOME} = $home;
         local $ENV{PATH} = $main_path;
-        my $path = "/test/t/blahblah%40example.com.mbox.gz";
+        my $path = "/test/t/blahblah%40example.com/mbox.gz";
         my $res = cgi_run($path);
         like($res->{head}, qr/^Status: 501 /, "search not-yet-enabled");
         my $indexed = system($index, $maindir) == 0;
diff --git a/t/plack.t b/t/plack.t
index 85dd337d..ed41ab17 100644
--- a/t/plack.t
+++ b/t/plack.t
@@ -101,6 +101,25 @@ EOF
                         qr!link\s+href="\Q$pfx\E/m/blah%40example\.com\.html"!s,
                         'atom feed generated correct URL');
         });
+
+        foreach my $t (qw(f m)) {
+                test_psgi($app, sub {
+                        my ($cb) = @_;
+                        my $pfx = 'http://example.com/test';
+                        my $path = "/$t/blah%40example.com/";
+                        my $res = $cb->(GET($pfx . $path));
+                        is(200, $res->code, "success for $path");
+                        like($res->content, qr!<title>hihi - Me</title>!,
+                                "HTML returned");
+                });
+        }
+        test_psgi($app, sub {
+                my ($cb) = @_;
+                my $pfx = 'http://example.com/test';
+                my $res = $cb->(GET($pfx . '/m/blah%40example.com/raw'));
+                is(200, $res->code, 'success response received for /m/*/raw');
+                like($res->content, qr!\AFrom !, "mbox returned");
+        });
 }
 
 done_testing();