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