Guest User

Untitled

a guest
May 6th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. # 500
  2. test_psgi
  3. app => builder {
  4. enable "StackTrace", no_print_errors => 1; # no warning in make test.
  5. MyApp->handler
  6. },
  7. client => sub {
  8. my $cb = shift;
  9. my $req = HTTP::Request->new( GET => 'http://localhost/foo/error' );
  10. $req->header('Accept' => 'text/html'); # get stack trace message
  11. my $res = $cb->( $req );
  12. is $res->code, '500';
  13. like $res->content, qr|\Qdie "error"\E|;
  14. } ;
Advertisement
Add Comment
Please, Sign In to add comment