summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorFrancois Deppierraz <francois.deppierraz@camptocamp.com>2008-07-03 10:34:49 +0200
committerJames Turnbull <james@lovedthanlost.net>2008-07-03 19:59:45 +1000
commit7a6ae299621a16fa7fd8ab0fbd2c05fe723cffa4 (patch)
tree3a241f9b8810f06dd37b6ee2c4fa0f57757d60c5 /spec
parent731d0f2291ccf900aab29eabed311607173b70ee (diff)
downloadpuppet-7a6ae299621a16fa7fd8ab0fbd2c05fe723cffa4.tar.gz
puppet-7a6ae299621a16fa7fd8ab0fbd2c05fe723cffa4.tar.xz
puppet-7a6ae299621a16fa7fd8ab0fbd2c05fe723cffa4.zip
Add a missing test for exercising the last untested line of lib/puppet/type/ssh_authorized_key.rb
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/type/ssh_authorized_key.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/type/ssh_authorized_key.rb b/spec/unit/type/ssh_authorized_key.rb
index 3c87decf1..0b41af40a 100755
--- a/spec/unit/type/ssh_authorized_key.rb
+++ b/spec/unit/type/ssh_authorized_key.rb
@@ -118,6 +118,16 @@ describe ssh_authorized_key do
@catalog.resource(:file, target).should be_an_instance_of(Puppet::Type.type(:file))
end
+ it "should raise an error when neither user nor target is given" do
+ proc do
+ @class.create(
+ :name => "Test",
+ :key => "AAA",
+ :type => "ssh-rsa",
+ :ensure => :present)
+ end.should raise_error(Puppet::Error)
+ end
+
after do
@class.clear
@catalog.clear