summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/resource/cron_d_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/unit/resource/cron_d_spec.rb b/spec/unit/resource/cron_d_spec.rb
index 7b1cf3d5ba..93026422a4 100644
--- a/spec/unit/resource/cron_d_spec.rb
+++ b/spec/unit/resource/cron_d_spec.rb
@@ -1,5 +1,5 @@
#
-# Copyright:: Copyright 2018, Chef Software, Inc.
+# Copyright:: Copyright 2018-2020, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,4 +33,16 @@ describe Chef::Resource::CronD do
it "the cron_name property is the name_property" do
expect(resource.cron_name).to eql("cronify")
end
+
+ it "the mode property defaults to '0600'" do
+ expect(resource.mode).to eql("0600")
+ end
+
+ it "the user property defaults to 'root'" do
+ expect(resource.user).to eql("root")
+ end
+
+ it "the command property is required" do
+ expect { resource.command nil }.to raise_error(Chef::Exceptions::ValidationFailed)
+ end
end