Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
a few more limit tests
  • Loading branch information
kraih committed May 13, 2013
1 parent 9403920 commit 2a09b30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t/mojo/request.t
Expand Up @@ -340,8 +340,10 @@ is $req->headers->content_length, undef, 'no "Content-Length" value';
is(($req->error)[1], 431, 'right status');
ok $req->is_limit_exceeded, 'limit is exceeded';
ok $limit, 'limit is exceeded';
ok $req->error('Nothing important.')->is_limit_exceeded,
'limit is still exceeded';
$req->error('Nothing important.');
is(($req->error)[0], 'Nothing important.', 'right error');
is(($req->error)[1], undef, 'no status');
ok $req->is_limit_exceeded, 'limit is still exceeded';
}

# Parse HTTP 1.0 start line and headers (with line size limit)
Expand Down
1 change: 1 addition & 0 deletions t/mojo/user_agent.t
Expand Up @@ -317,6 +317,7 @@ $tx = $ua->get('/echo' => 'Hello World!');
ok !$tx->success, 'not successful';
is(($tx->error)[0], 'Maximum message size exceeded', 'right error');
is(($tx->error)[1], undef, 'no code');
ok $tx->res->is_limit_exceeded, 'limit is exceeded';

# 404 response
$tx = $ua->get('/does_not_exist');
Expand Down

0 comments on commit 2a09b30

Please sign in to comment.