summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-03-23 14:01:42 -0700
committerTim Smith <tsmith84@gmail.com>2020-03-23 14:01:42 -0700
commit9053919cd2936468013cb7862e26943210b82aad (patch)
treedcd6a7836f9d4ec024977c0612c0d38c1ef573fb
parent9110c108c8f7ad89d296089e1a6b5e9e3970490b (diff)
downloadchef-9053919cd2936468013cb7862e26943210b82aad.tar.gz
Fixes to the mixin tests from the review
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/mixin/cron_validations_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/unit/mixin/cron_validations_spec.rb b/spec/unit/mixin/cron_validations_spec.rb
index 409df2da1c..b37a523237 100644
--- a/spec/unit/mixin/cron_validations_spec.rb
+++ b/spec/unit/mixin/cron_validations_spec.rb
@@ -56,7 +56,7 @@ describe Chef::Mixin::CronValidations do
expect(Chef::Mixin::CronValidations.validate_month(13)).to be false
end
- it "returns false for an invalid string" do
+ it "returns false for an invalid string (typo)" do
expect(Chef::Mixin::CronValidations.validate_month("janurary")).to be false
end
end
@@ -66,8 +66,12 @@ describe Chef::Mixin::CronValidations do
expect(Chef::Mixin::CronValidations.validate_numeric(5, 1, 100)).to be true
end
- it "returns false if the value is out of the allowed range" do
+ it "returns false if the value less than the allowed range" do
expect(Chef::Mixin::CronValidations.validate_numeric(-1, 1, 100)).to be false
end
+
+ it "returns false if the value more than the allowed range" do
+ expect(Chef::Mixin::CronValidations.validate_numeric(101, 1, 100)).to be false
+ end
end
end