summaryrefslogtreecommitdiffstats
path: root/spec/unit/type/ssh_authorized_key.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/type/ssh_authorized_key.rb')
-rwxr-xr-xspec/unit/type/ssh_authorized_key.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/type/ssh_authorized_key.rb b/spec/unit/type/ssh_authorized_key.rb
index db389864e..f1e9963e9 100755
--- a/spec/unit/type/ssh_authorized_key.rb
+++ b/spec/unit/type/ssh_authorized_key.rb
@@ -121,4 +121,13 @@ describe ssh_authorized_key do
resource.should(:target).should == target
end
end
+
+ describe "when calling validate" do
+ it "should not crash on a non-existant user" do
+ resource = @class.create(
+ :name => "Test",
+ :user => "ihopesuchuserdoesnotexist")
+ proc { resource.validate }.should_not raise_error
+ end
+ end
end