diff options
author | Corey Hemminger <hemminger@hotmail.com> | 2017-05-02 13:56:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 13:56:54 -0500 |
commit | 09681d1936452aab440957dbbdebc5c261aeef54 (patch) | |
tree | c5f1021ea7666ec0d8e70ad196b2dee150b71e1d | |
parent | 1bc27a316b8f4c990b8a7e3d1c15d12f7ffe4468 (diff) | |
download | chef-09681d1936452aab440957dbbdebc5c261aeef54.tar.gz |
updated tests
Signed-off-by: Corey Hemminger corey.hemminger@nativex.com
-rw-r--r-- | spec/unit/resource/windows_task_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/unit/resource/windows_task_spec.rb b/spec/unit/resource/windows_task_spec.rb index fa2d458bbb..acbfeaa926 100644 --- a/spec/unit/resource/windows_task_spec.rb +++ b/spec/unit/resource/windows_task_spec.rb @@ -166,12 +166,16 @@ describe Chef::Resource::WindowsTask do end context "#validate_create_day" do - it "raises error if frequency is not :weekly" do - expect { resource.send(:validate_create_day, "Mon", :monthly) }.to raise_error("day attribute is only valid for tasks that run weekly") + it "raises error if frequency is not :weekly or :monthly" do + expect { resource.send(:validate_create_day, "Mon", :daily) }.to raise_error("day attribute is only valid for tasks that run weekly of monthly") + end + + it "accepts a valid day range" do + expect { resource.send(:validate_create_day, "Mon-Fri", :weekly) }.not_to raise_error end it "accepts a valid single day" do - expect { resource.send(:validate_create_day, "Mon", :weekly) }.not_to raise_error + expect { resource.send(:validate_create_day, "Mon", :monthly) }.not_to raise_error end it "accepts a comma separated list of valid days" do |