diff --git a/spec/classes/heat_cors_spec.rb b/spec/classes/heat_cors_spec.rb index 675c6313..8620001f 100644 --- a/spec/classes/heat_cors_spec.rb +++ b/spec/classes/heat_cors_spec.rb @@ -4,12 +4,14 @@ describe 'heat::cors' do shared_examples_for 'heat cors' do it 'configure cors default params' do - is_expected.to contain_heat_config('cors/allowed_origin').with_value('') - is_expected.to contain_heat_config('cors/allow_credentials').with_value('') - is_expected.to contain_heat_config('cors/expose_headers').with_value('') - is_expected.to contain_heat_config('cors/max_age').with_value('') - is_expected.to contain_heat_config('cors/allow_methods').with_value('') - is_expected.to contain_heat_config('cors/allow_headers').with_value('') + is_expected.to contain_oslo__cors('heat_config').with( + :allowed_origin => '', + :allow_credentials => '', + :expose_headers => '', + :max_age => '', + :allow_methods => '', + :allow_headers => '', + ) end context 'with specific parameters' do @@ -24,12 +26,14 @@ describe 'heat::cors' do end it 'configure cors params' do - is_expected.to contain_heat_config('cors/allowed_origin').with_value('*') - is_expected.to contain_heat_config('cors/allow_credentials').with_value(true) - is_expected.to contain_heat_config('cors/expose_headers').with_value('Content-Language,Expires') - is_expected.to contain_heat_config('cors/max_age').with_value(3600) - is_expected.to contain_heat_config('cors/allow_methods').with_value('GET,POST,PUT,DELETE,OPTIONS') - is_expected.to contain_heat_config('cors/allow_headers').with_value('Content-Type,Cache-Control') + is_expected.to contain_oslo__cors('heat_config').with( + :allowed_origin => '*', + :allow_credentials => true, + :expose_headers => 'Content-Language,Expires', + :max_age => 3600, + :allow_methods => 'GET,POST,PUT,DELETE,OPTIONS', + :allow_headers => 'Content-Type,Cache-Control', + ) end end end