Adds rspec tests for nginx_cfg_prepend
This commit is contained in:
parent
ce407aa06d
commit
409f8ef4e3
1 changed files with 29 additions and 0 deletions
|
@ -164,6 +164,35 @@ describe 'nginx::config' do
|
|||
' test1 test value 2;',
|
||||
],
|
||||
},
|
||||
{
|
||||
:title => 'should contain ordered appended directives from hash',
|
||||
:attr => 'nginx_cfg_prepend',
|
||||
:value => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'allow' => 'test value 3' },
|
||||
:match => [
|
||||
'allow test value 3;',
|
||||
'test1 test value 1;',
|
||||
'test2 test value 2;',
|
||||
],
|
||||
},
|
||||
{
|
||||
:title => 'should contain duplicate appended directives from list of hashes',
|
||||
:attr => 'nginx_cfg_prepend',
|
||||
:value => [[ 'allow', 'test value 1'], ['allow', 'test value 2' ]],
|
||||
:match => [
|
||||
'allow test value 1;',
|
||||
'allow test value 2;',
|
||||
],
|
||||
},
|
||||
{
|
||||
:title => 'should contain duplicate appended directives from array values',
|
||||
:attr => 'nginx_cfg_prepend',
|
||||
:value => { 'test1' => ['test value 1', 'test value 2', 'test value 3'] },
|
||||
:match => [
|
||||
'test1 test value 1;',
|
||||
'test1 test value 2;',
|
||||
'test1 test value 3;',
|
||||
],
|
||||
},
|
||||
{
|
||||
:title => 'should set pid',
|
||||
:attr => 'pid',
|
||||
|
|
Loading…
Reference in a new issue