9dd92e7081
This conversion is done by Transpec 3.1.0 with the following command: transpec spec/acceptance/ * 16 conversions from: it { should ... } to: it { is_expected.to ... } * 6 conversions from: obj.should to: expect(obj).to * 5 conversions from: == expected to: eq(expected) * 1 conversion from: it { should_not ... } to: it { is_expected.not_to ... } For more details: https://github.com/yujinakayama/transpec#supported-conversions
28 lines
671 B
Ruby
28 lines
671 B
Ruby
require 'spec_helper_acceptance'
|
|
|
|
describe "nginx::resource::mailhost define:" do
|
|
it 'should run successfully' do
|
|
|
|
pp = "
|
|
class { 'nginx':
|
|
mail => true,
|
|
}
|
|
nginx::resource::mailhost { 'domain1.example':
|
|
ensure => present,
|
|
auth_http => 'localhost/cgi-bin/auth',
|
|
protocol => 'smtp',
|
|
listen_port => 587,
|
|
ssl_port => 465,
|
|
xclient => 'off',
|
|
}
|
|
"
|
|
|
|
apply_manifest(pp, :catch_failures => true)
|
|
end
|
|
|
|
describe file('/etc/nginx/conf.mail.d/domain1.example.conf') do
|
|
it { is_expected.to be_file }
|
|
it { is_expected.to contain "auth_http localhost/cgi-bin/auth;" }
|
|
end
|
|
|
|
end
|