diff --git a/spec/unit/type/logical_volume_spec.rb b/spec/unit/type/logical_volume_spec.rb index d4dac5ce..999206e7 100644 --- a/spec/unit/type/logical_volume_spec.rb +++ b/spec/unit/type/logical_volume_spec.rb @@ -185,6 +185,19 @@ }.not_to raise_error end + it 'raises an ArgumentError when the physical volume is neither string nor array' do + expect { + resource = Puppet::Type.type(:logical_volume).new( + name: 'john', + ensure: :present, + volume_group: 'ernie', + size: '10M', + physical_volume: 42, + ) + }.to raise_error(Puppet::ResourceError, + 'physical_volume should be String or Array: 42') + end + it 'invalid number of stripes raises error' do expect { resource = Puppet::Type.type(:logical_volume).new(