summaryrefslogtreecommitdiffstats
path: root/spec/unit/type/service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/type/service_spec.rb')
-rwxr-xr-xspec/unit/type/service_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/type/service_spec.rb b/spec/unit/type/service_spec.rb
index 40270e7c8..ab006a4be 100755
--- a/spec/unit/type/service_spec.rb
+++ b/spec/unit/type/service_spec.rb
@@ -57,6 +57,21 @@ describe Puppet::Type.type(:service), "when validating attribute values" do
Puppet::Type.type(:service).new(:name => "yay", :enable => :false)
end
+ it "should support :manual as a value to :enable on Windows" do
+ Puppet.features.stubs(:microsoft_windows?).returns true
+
+ Puppet::Type.type(:service).new(:name => "yay", :enable => :manual)
+ end
+
+ it "should not support :manual as a value to :enable when not on Windows" do
+ Puppet.features.stubs(:microsoft_windows?).returns false
+
+ expect { Puppet::Type.type(:service).new(:name => "yay", :enable => :manual) }.to raise_error(
+ Puppet::Error,
+ /Setting enable to manual is only supported on Microsoft Windows\./
+ )
+ end
+
it "should support :true as a value to :hasstatus" do
Puppet::Type.type(:service).new(:name => "yay", :hasstatus => :true)
end