3 if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0
4 describe 'test::httpurl', type: :class do
5 describe 'valid handling' do
8 https://notcreative.org
9 https://canstillaccepthttps.co.uk
11 http://runningoutofideas.gov
13 http://graphemica.com/❤
14 http://graphemica.com/緩
16 describe value.inspect do
17 let(:params) {{ value: value }}
18 it { is_expected.to compile }
23 describe 'invalid path handling' do
24 context 'garbage inputs' do
32 "httds://notquiteright.org",
34 "https;//notrightbutclose.org",
35 "hts://graphemica.com/❤",
36 "https:graphemica.com/緩"
38 describe value.inspect do
39 let(:params) {{ value: value }}
40 it { is_expected.to compile.and_raise_error(/parameter 'value' expects a match for Stdlib::HTTPUrl/) }