Merge branch 'dev' of https://github.com/abraham1901/puppetlabs-nginx into dev
This commit is contained in:
commit
6997df9d5a
2 changed files with 19 additions and 0 deletions
|
@ -538,6 +538,18 @@ describe 'nginx::resource::location' do
|
|||
|
||||
it { expect { should contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, /Cannot define both directory and proxy in a virtual host/) }
|
||||
end
|
||||
|
||||
context 'when vhost name is sanitized' do
|
||||
let :title do 'www.rspec-location.com' end
|
||||
let :params do {
|
||||
:vhost => 'www rspec-vhost com',
|
||||
:www_root => '/',
|
||||
:ssl => true,
|
||||
} end
|
||||
|
||||
it { should contain_concat__fragment("www_rspec-vhost_com-500-www.rspec-location.com").with_target('/etc/nginx/sites-available/www_rspec-vhost_com.conf') }
|
||||
it { should contain_concat__fragment("www_rspec-vhost_com-800-www.rspec-location.com-ssl").with_target('/etc/nginx/sites-available/www_rspec-vhost_com.conf') }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -600,6 +600,13 @@ describe 'nginx::resource::vhost' do
|
|||
it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test2 test value 2;/ ) }
|
||||
it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test3 test value 3;/ ) }
|
||||
end
|
||||
|
||||
context 'when vhost name is sanitized' do
|
||||
let :title do 'www rspec-vhost com' end
|
||||
let :params do default_params end
|
||||
|
||||
it { should contain_concat('/etc/nginx/sites-available/www_rspec-vhost_com.conf') }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue