diff options
author | Bryan McLellan <btm@loftninjas.org> | 2014-08-07 17:32:53 -0400 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2014-08-12 16:51:11 -0400 |
commit | 1cca6c457ad21b7d6127300a21ec0185dde20565 (patch) | |
tree | 25994357727bdfeea94154fb621ad44395f99acf /spec | |
parent | 940479ea0bbd5c8f2feeb1293db63cd396a484aa (diff) | |
download | chef-1cca6c457ad21b7d6127300a21ec0185dde20565.tar.gz |
CHEF-5022: leave enabled to nil for all other states
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/service/windows_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/provider/service/windows_spec.rb b/spec/unit/provider/service/windows_spec.rb index b303a35ff9..0c71d0ff41 100644 --- a/spec/unit/provider/service/windows_spec.rb +++ b/spec/unit/provider/service/windows_spec.rb @@ -59,6 +59,13 @@ describe Chef::Provider::Service::Windows, "load_current_resource" do @provider.current_resource.enabled.should be_true end + it "does not set the current resources start type if it is neither AUTO START or DISABLED" do + Win32::Service.stub(:config_info).with(@new_resource.service_name).and_return( + double("ConfigStruct", :start_type => "manual")) + @provider.load_current_resource + @provider.current_resource.enabled.should be_nil + end + describe Chef::Provider::Service::Windows, "start_service" do before(:each) do Win32::Service.stub(:status).with(@new_resource.service_name).and_return( |