0
0
mirror of https://github.com/saltstack-formulas/timezone-formula.git synced 2024-12-03 23:10:48 +01:00
timezone-formula/test/integration/default/controls/config_spec.rb

23 lines
494 B
Ruby
Raw Normal View History

2019-08-25 23:58:54 +02:00
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