summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorVasu1105 <vasundhara.jagdale@msystechnologies.com>2017-12-18 11:57:04 +0000
committerVasu1105 <vasundhara.jagdale@msystechnologies.com>2018-01-05 06:38:55 +0000
commit7fd821058fb94d708e8f2fdc95b26823c1ef92b2 (patch)
tree92391c4d76d546a7ee456b196f06230e1f6ec02d /spec
parentc6433605bae0a9f52c843ca8cb97e64b2bcf5f0a (diff)
downloadchef-7fd821058fb94d708e8f2fdc95b26823c1ef92b2.tar.gz
chef#6638 fixed random_delay and execution_time_limit property not idempotent for windows_task resource
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/resource/windows_task_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/resource/windows_task_spec.rb b/spec/unit/resource/windows_task_spec.rb
index fe0c55ecaf..a40e143a49 100644
--- a/spec/unit/resource/windows_task_spec.rb
+++ b/spec/unit/resource/windows_task_spec.rb
@@ -281,23 +281,23 @@ describe Chef::Resource::WindowsTask do
end
context "#sec_to_dur" do
- it "return PT0S when passed 0" do
- expect(resource.send(:sec_to_dur, 0)).to eql("PT0S")
+ it "return nil when passed 0" do
+ expect(resource.send(:sec_to_dur, 0)).to eql(nil)
end
it "return PT1S when passed 1" do
expect(resource.send(:sec_to_dur, 1)).to eql("PT1S")
end
- it "return PT24H0S when passed 86400" do
- expect(resource.send(:sec_to_dur, 86400)).to eql("PT24H0S")
+ it "return PT86400S when passed 86400" do
+ expect(resource.send(:sec_to_dur, 86400)).to eql("PT86400S")
end
- it "return P1DT1S when passed 86401" do
- expect(resource.send(:sec_to_dur, 86401)).to eql("P1DT1S")
+ it "return PT86401S when passed 86401" do
+ expect(resource.send(:sec_to_dur, 86401)).to eql("PT86401S")
end
- it "return P1DT1M40S when passed 86500" do
- expect(resource.send(:sec_to_dur, 86500)).to eql("P1DT1M40S")
+ it "return PT86500S when passed 86500" do
+ expect(resource.send(:sec_to_dur, 86500)).to eql("PT86500S")
end
- it "return P1WT1S when passed 604801" do
- expect(resource.send(:sec_to_dur, 604801)).to eql("P1WT1S")
+ it "return PT604801S when passed 604801" do
+ expect(resource.send(:sec_to_dur, 604801)).to eql("PT604801S")
end
end
end