diff options
-rw-r--r-- | spec/unit/resource/service_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/resource/windows_service_spec.rb | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/resource/service_spec.rb b/spec/unit/resource/service_spec.rb index 9bade1698d..a94beece6b 100644 --- a/spec/unit/resource/service_spec.rb +++ b/spec/unit/resource/service_spec.rb @@ -145,6 +145,10 @@ describe Chef::Resource::Service do expect(resource.timeout).to eql(1) end + it "defaults the timeout property to 900 (seconds)" do + expect(resource.timeout).to eql(900) + end + %w{enabled running}.each do |prop| it "accepts true for #{prop} property" do resource.send(prop, true) diff --git a/spec/unit/resource/windows_service_spec.rb b/spec/unit/resource/windows_service_spec.rb index 4f93465b19..1a35e1ad52 100644 --- a/spec/unit/resource/windows_service_spec.rb +++ b/spec/unit/resource/windows_service_spec.rb @@ -48,6 +48,15 @@ describe Chef::Resource::WindowsService, "initialize" do expect { resource.action :unmask }.not_to raise_error end + it "accepts an Integer for timeout property" do + resource.timeout 1 + expect(resource.timeout).to eql(1) + end + + it "defaults the timeout property to 60 (seconds)" do + expect(resource.timeout).to eql(60) + end + %i{automatic manual disabled}.each do |type| it "supports setting startup_type property to #{type.inspect}" do resource.startup_type type |