summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-04-12 15:28:57 -0700
committerNick Lewis <nick@puppetlabs.com>2011-04-12 15:28:57 -0700
commit8778307ca33a637fe10b601ee737628f2e5f9fbf (patch)
tree89a4411933ef54e847d7d64de96de9814604639f /spec
parent789aad8dd692e1bac5748e16e0acdfada2d197c7 (diff)
parent0c6f50cbc1409cb9e31f4f512a7ff27d4b4c5167 (diff)
downloadpuppet-8778307ca33a637fe10b601ee737628f2e5f9fbf.tar.gz
puppet-8778307ca33a637fe10b601ee737628f2e5f9fbf.tar.xz
puppet-8778307ca33a637fe10b601ee737628f2e5f9fbf.zip
Merge branch 'ticket/next/775' into next
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/type/cron_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/type/cron_spec.rb b/spec/unit/type/cron_spec.rb
index 75cc0d484..e98529c60 100755
--- a/spec/unit/type/cron_spec.rb
+++ b/spec/unit/type/cron_spec.rb
@@ -478,4 +478,14 @@ describe Puppet::Type.type(:cron) do
end
end
+
+ it "should require a command when adding an entry" do
+ entry = @class.new(:name => "test_entry", :ensure => :present)
+ expect { entry.value(:command) }.should raise_error(/No command/)
+ end
+
+ it "should not require a command when removing an entry" do
+ entry = @class.new(:name => "test_entry", :ensure => :absent)
+ entry.value(:command).should == nil
+ end
end