diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/test-custodian-parser.rb | 24 |
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 # |