Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / type_aliases / objectstore_gsuri_spec.rb
1 require 'spec_helper'
2
3 if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0
4   describe 'Stdlib::ObjectStore::GSUri' do
5     describe 'accepts case-sensitive google cloud gs uris' do
6       [
7         'gs://mybucket/myfile.csv',
8         'gs://bucket/path/to/file.tar.gz',
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         'GS://mybucket/myfile.csv',
20         5,
21         'gs//mybucket/myfile.csv',
22         'gs:/mybucket/myfile.csv',
23         'gs:mybucket/myfile.csv',
24         'gs-mybucket/myfile.csv',
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