Skip to content

Commit

Permalink
add specs to test that arrays are properly handled - lesaux#64
Browse files Browse the repository at this point in the history
  • Loading branch information
madAndroid committed Feb 10, 2017
1 parent d53b761 commit c51610f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,30 @@
end
it { is_expected.to_not contain_yumrepo('kibana-4.5') }
end

context 'handles array values in the config hash' do
let :facts do
{
:osfamily => 'RedHat'
}
end
let :params do
{
:version => 'latest',
:service_ensure => true,
:service_enable => true,
:config => {
'server.port' => 5601,
'server.host' => '0.0.0.0',
'elasticsearch.url' => 'http://localhost:9200',
'bundled_plugin_ids' => [
'plugins/visualize/index'
]
}
}
end
it { is_expected.to contain_file('kibana-config-file')
.with_content(/^( - plugins\/visualize\/index)$/) }
end

end

0 comments on commit c51610f

Please sign in to comment.