postfix-cookbook/spec/wrapper_spec.rb
Tim Smith 82aec2f311 Fix wrapper cookbook in the specs completely failing
It’s still broken, but now it actually tests

Signed-off-by: Tim Smith <tsmith@chef.io>
2017-01-17 23:32:22 -08:00

21 lines
672 B
Ruby

require 'spec_helper'
##
# Spec to ensure wrapper cookbook can correctly override
# attributes using default level without _attributes
# recipe clearing them.
describe 'test::default' do
cached(:chef_run) do
ChefSpec::SoloRunner.new(platform: 'ubuntu', version: 16.04).converge(described_recipe)
end
describe '_attributes recipes' do
it 'keeps wrapper cookbook default set attributes' do
expect(chef_run.node['postfix']['main']['relayhost']).to eq('please')
expect(chef_run.node['postfix']['main']['smtp_sasl_security_options']).to eq('keep')
expect(chef_run.node['postfix']['sasl']['smtp_sasl_user_name']).to eq('us')
end
end
end