module-nginx/spec/acceptance/nginx_mail_spec.rb
Matthew Haughton 9dd92e7081 Convert acceptance specs to RSpec 3.2.2 syntax
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
2015-04-13 23:28:51 -04:00

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