2014-02-02 17:48:24 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'sshd::ssh_authorized_key' do
|
|
|
|
|
2014-02-05 23:17:36 +01:00
|
|
|
context 'manage authorized key' do
|
2014-02-02 17:48:24 +01:00
|
|
|
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
|