From 7e0b00834bb4a866bdb4de01fc12a2cba55b6cbb Mon Sep 17 00:00:00 2001 From: dheerajd-msys Date: Fri, 12 Jan 2018 15:18:05 +0530 Subject: Fix rspecs Signed-off-by: dheerajd-msys --- spec/unit/resource/windows_task_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/unit/resource/windows_task_spec.rb') diff --git a/spec/unit/resource/windows_task_spec.rb b/spec/unit/resource/windows_task_spec.rb index 18a4960d90..102a5e8874 100644 --- a/spec/unit/resource/windows_task_spec.rb +++ b/spec/unit/resource/windows_task_spec.rb @@ -111,6 +111,10 @@ describe Chef::Resource::WindowsTask do resource.after_created expect(resource.random_delay).to eq("PT60S") end + + it "raises error that random_delay is not supported" do + expect { resource.send(:validate_random_delay, 60, :on_idle) }.to raise_error(ArgumentError, "`random_delay` property is supported only for frequency :minute, :hourly, :daily, :weekly and :monthly") + end end context "when execution_time_limit isn't specified" do -- cgit v1.2.1