From 9f26a47dda30811738566f268f0f8a0159135d1c Mon Sep 17 00:00:00 2001 From: Dmitriy Samovskiy Date: Tue, 29 Sep 2015 13:34:49 -0700 Subject: [PATCH] add a test for sensu_api_endpoints param --- spec/classes/uchiwa_spec.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spec/classes/uchiwa_spec.rb b/spec/classes/uchiwa_spec.rb index 577fbf4..4faefe9 100644 --- a/spec/classes/uchiwa_spec.rb +++ b/spec/classes/uchiwa_spec.rb @@ -144,4 +144,13 @@ end -end \ No newline at end of file + context 'with sensu_api_endpoints' do + let(:params) {{ :sensu_api_endpoints => [ { 'name' => 'foo', 'host' => 'bar' } ] }} + it { + should contain_file('/etc/sensu/uchiwa.json') \ + .with_content(/"name": "foo"/) \ + .with_content(/"host": "bar"/) + } + end + +end