mirror of
https://github.com/inspec/inspec
synced 2024-12-22 19:13:24 +00:00
659b4b373a
Signed-off-by: Miah Johnson <miah@chia-pet.org>
26 lines
669 B
Ruby
26 lines
669 B
Ruby
# author: Joseph Benden
|
|
|
|
require 'helper'
|
|
|
|
describe BsdMountParser do
|
|
let (:parser) { Class.new() { include BsdMountParser }.new }
|
|
|
|
describe '#parse_mount_options' do
|
|
it 'parses nil content' do
|
|
parser.parse_mount_options(nil).must_equal({})
|
|
end
|
|
|
|
it 'parses an empty mount line' do
|
|
parser.parse_mount_options('').must_equal({})
|
|
end
|
|
|
|
it 'parses a valid mount line' do
|
|
info = {
|
|
:device => 'tank/tmp',
|
|
:type => 'zfs',
|
|
:options => ['local', 'noexec', 'nosuid', 'nfsv4acls'],
|
|
}
|
|
parser.parse_mount_options('tank/tmp on /tmp (zfs, local, noexec, nosuid, nfsv4acls)').must_equal(info)
|
|
end
|
|
end
|
|
end
|