diff options
-rwxr-xr-x | spec/unit/type/ssh_authorized_key.rb | 10 |
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 |