aboutsummaryrefslogtreecommitdiff
path: root/spec/defines/ssh_authorized_key_spec.rb
blob: 0cc4eb8331e9d2c42344045f5266c69188b81bca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'spec_helper'

describe 'sshd::ssh_authorized_key' do

  context 'manage 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