template-formula/test/integration/default/controls/subcomponent_config_spec.rb
Dafydd Jones 2e8ded6565 refactor: improve reusability using an unique keyword TEMPLATE
BREAKING CHANGE: changed all state names and ids
2019-12-04 23:47:41 +00:00

25 lines
694 B
Ruby

# frozen_string_literal: true
control 'TEMPLATE subcomponent configuration' do
title 'should match desired lines'
describe file('/etc/TEMPLATE-subcomponent-formula.conf') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
its('content') do
should include(
'# File managed by Salt at '\
'<salt://TEMPLATE/subcomponent/config/files/default/'\
'subcomponent-example.tmpl.jinja>.'
)
end
its('content') do
should include(
'This is another subcomponent example file from SaltStack '\
'template-formula.'
)
end
end
end