summaryrefslogtreecommitdiff
path: root/t/test-custodian-parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 't/test-custodian-parser.rb')
-rwxr-xr-xt/test-custodian-parser.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb
index cfecbb3..a6e075f 100755
--- a/t/test-custodian-parser.rb
+++ b/t/test-custodian-parser.rb
@@ -430,7 +430,31 @@ EOF
end
end
+ #
+ # HTTP/HTTPS tests might specify custom expiry
+ #
+ def test_https_custom_expiry
+
+ parser = Custodian::Parser.new
+
+ #
+ # A series of tests to parse
+ #
+ text = []
+ text.push('https://example.com/ must run https')
+ text.push('https://example.com/ must run https and cannot expire within 14 days')
+ text.push('https://example.com/ must run https and cannot expire within 45 days')
+ text.push('https://example.com/ must run https and cannot expire within 300 days')
+ #
+ # Test the parser with this text
+ #
+ text.each do |txt|
+ assert_raise ArgumentError do
+ parser.parse_lines(txt)
+ end
+ end
+ end
#