aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTomas Barton <barton.tomas@gmail.com>2014-02-02 17:48:24 +0100
committerTomas Barton <barton.tomas@gmail.com>2014-02-02 17:48:24 +0100
commita0e961674b96c070e0a32bce3f224a1512aa128d (patch)
tree11995be570bb354b24db2d51948ba676794241c9 /spec
parentdfc6d99c931ae9cba373903b4f9da94ca7db41c1 (diff)
downloadpuppet-sshd-a0e961674b96c070e0a32bce3f224a1512aa128d.tar.gz
puppet-sshd-a0e961674b96c070e0a32bce3f224a1512aa128d.tar.bz2
tests for ssh authorized key
Diffstat (limited to 'spec')
-rw-r--r--spec/defines/ssh_authorized_key_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/defines/ssh_authorized_key_spec.rb b/spec/defines/ssh_authorized_key_spec.rb
new file mode 100644
index 0000000..a554d9d
--- /dev/null
+++ b/spec/defines/ssh_authorized_key_spec.rb
@@ -0,0 +1,22 @@
+require 'spec_helper'
+
+describe 'sshd::ssh_authorized_key' do
+
+ context 'add authorized key' do
+ let(:title) { 'foo' }
+ let(:ssh_key) { 'some_secret_ssh_key' }
+
+ let(:params) {{
+ :key => ssh_key,
+ }}
+
+ it { should contain_ssh_authorized_key('foo').with({
+ 'ensure' => 'present',
+ 'type' => 'ssh-dss',
+ 'user' => 'foo',
+ 'target' => '/home/foo/.ssh/authorized_keys',
+ 'key' => ssh_key,
+ })
+ }
+ end
+end