0
0
mirror of https://github.com/saltstack-formulas/timezone-formula.git synced 2024-12-12 01:40:13 +01:00
timezone-formula/test/integration/default/controls/config_spec.rb
2019-08-26 10:30:19 +02:00

23 lines
494 B
Ruby

control 'Timezone configuration' do
title 'should match desired lines'
def test_file_content(config_file)
describe file(config_file) do
its('content') { should include 'Europe/Paris' }
end
end
def test_symlink(config_file)
describe file(config_file) do
its('link_path') { should eq '/usr/share/zoneinfo/Europe/Paris' }
end
end
case os[:family]
when 'debian'
test_file_content('/etc/timezone')
else
test_symlink('/etc/localtime')
end
end