Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / type_aliases / objectstore_s3uri_spec.rb
1 require 'spec_helper'
2
3 if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0
4   describe 'Stdlib::ObjectStore::S3Uri' do
5     describe 'accepts case-sensitive amazon web services s3 uris' do
6       [
7         's3://bucket-name/path',
8         's3://bucket/path/to/file.txt',
9       ].each do |value|
10         describe value.inspect do
11           it { is_expected.to allow_value(value) }
12         end
13       end
14     end
15
16     describe 'rejects other values' do
17       [
18         '',
19         'S3://bucket-name/path',
20         3,
21         's3:/bucket-name/path',
22         's3//bucket-name/path',
23         's3:bucket-name/path',
24         's3-bucket-name/path',
25       ].each do |value|
26         describe value.inspect do
27           it { is_expected.not_to allow_value(value) }
28         end
29       end
30     end
31   end
32 end