Skip to content

Instantly share code, notes, and snippets.

/ka.diff Secret

Created March 12, 2016 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ca074ea5d4fa5896147c to your computer and use it in GitHub Desktop.
Save anonymous/ca074ea5d4fa5896147c to your computer and use it in GitHub Desktop.
diff --git a/t/mojo/user_agent.t b/t/mojo/user_agent.t
index 0e215fa..de5e604 100644
--- a/t/mojo/user_agent.t
+++ b/t/mojo/user_agent.t
@@ -362,7 +362,15 @@ ok $tx->res->is_limit_exceeded, 'limit is exceeded';
# 404 response
$tx = $ua->get('/does_not_exist');
+ok !$tx->success, 'not successful';
+ok !$tx->kept_alive, 'kept connection not alive';
+ok $tx->keep_alive, 'keep connection alive';
+is $tx->error->{message}, 'Not Found', 'right error';
+is $tx->error->{code}, 404, 'right status';
+$tx = $ua->get('/does_not_exist');
ok !$tx->success, 'not successful';
+ok $tx->kept_alive, 'kept connection alive';
+ok $tx->keep_alive, 'keep connection alive';
is $tx->error->{message}, 'Not Found', 'right error';
is $tx->error->{code}, 404, 'right status';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment