summaryrefslogtreecommitdiff
path: root/t/get-netssleay.t
diff options
context:
space:
mode:
Diffstat (limited to 't/get-netssleay.t')
-rw-r--r--t/get-netssleay.t36
1 files changed, 36 insertions, 0 deletions
diff --git a/t/get-netssleay.t b/t/get-netssleay.t
new file mode 100644
index 0000000..9c83a0f
--- /dev/null
+++ b/t/get-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_get(
+ { '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');
+