diff options
Diffstat (limited to 't/post-netssleay.t')
-rw-r--r-- | t/post-netssleay.t | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/t/post-netssleay.t b/t/post-netssleay.t new file mode 100644 index 0000000..e8cb2fd --- /dev/null +++ b/t/post-netssleay.t @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Test::More; + +plan( tests=>4 ); + +use_ok 'Net::HTTPS::Any'; + +#200 + +my($content, $response, %headers) = Net::HTTPS::Any::https_post( + { 'host' => 'secure.sisd.com', + 'port' => 443, + 'path' => '/freeside/index.html', + }, + 'net_https_any_test' => 1, +); + +like($response, qr/^HTTP\/[\d\.]+\s+200/i, 'Received 200 (OK) response'); + +ok( length($content), 'Received content' ); + +#404 + +my($content2, $response2, %headers2) = Net::HTTPS::Any::https_get( + { 'host' => 'secure.sisd.com', + 'port' => 443, + 'path' => '/freeside/notfound.html', + }, + 'net_https_any_test' => 1, +); + +like($response2, qr/^HTTP\/[\d\.]+\s+404/i, 'Received 404 (OK) response'); + |