0
0
mirror of https://github.com/saltstack-formulas/timezone-formula.git synced 2024-11-28 05:37:59 +01:00
timezone-formula/test/integration/default/controls/config_spec.rb

25 lines
525 B
Ruby

# frozen_string_literal: true
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