summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-07-20 16:25:20 +0100
committerThom May <thom@chef.io>2016-07-26 14:33:30 +0100
commitac30759d76a0634071ee0c65531b8fd2be2f7bcf (patch)
tree1b668393fceb52d403005b3c732ff0205a28e12f
parentff9d72e533a5a5e5afa53d4cf9a8feef3078925f (diff)
downloadchef-ac30759d76a0634071ee0c65531b8fd2be2f7bcf.tar.gz
Add failing functional tests for empty cron attrs
Signed-off-by: Thom May <thom@chef.io>
-rw-r--r--spec/functional/resource/cron_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/functional/resource/cron_spec.rb b/spec/functional/resource/cron_spec.rb
index 3380eccb0d..2a6811ef9f 100644
--- a/spec/functional/resource/cron_spec.rb
+++ b/spec/functional/resource/cron_spec.rb
@@ -146,6 +146,13 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do
new_resource.home "/home/opscode"
create_and_validate_with_attribute(new_resource, "home", "/home/opscode")
end
+
+ %i{ home mailto path shell }.each do |attr|
+ it "supports an empty string for #{attr} attribute" do
+ new_resource.send(attr, "")
+ create_and_validate_with_attribute(new_resource, attr.to_s, "")
+ end
+ end
end
describe "negative tests for create action" do