nginx_mail_spec.rb 655 B

12345678910111213141516171819202122232425262728
  1. require 'spec_helper_acceptance'
  2. describe "nginx::resource::mailhost define:" do
  3. it 'should run successfully' do
  4. pp = "
  5. class { 'nginx':
  6. mail => true,
  7. }
  8. nginx::resource::mailhost { 'domain1.example':
  9. ensure => present,
  10. auth_http => 'localhost/cgi-bin/auth',
  11. protocol => 'smtp',
  12. listen_port => 587,
  13. ssl_port => 465,
  14. xclient => 'off',
  15. }
  16. "
  17. apply_manifest(pp, :catch_failures => true)
  18. end
  19. describe file('/etc/nginx/conf.mail.d/domain1.example.conf') do
  20. it { should be_file }
  21. it { should contain "auth_http localhost/cgi-bin/auth;" }
  22. end
  23. end