add test for options

This commit is contained in:
mh 2014-02-05 23:21:36 +01:00
parent 15a1a73462
commit 253e4f1ced

View file

@ -19,4 +19,27 @@ describe 'sshd::ssh_authorized_key' do
})
}
end
context 'manage authoried key with options' do
let(:title) { 'foo2' }
let(:ssh_key) { 'some_secret_ssh_key' }
let(:params) {{
:key => ssh_key,
:options => ['command="/usr/bin/date"',
'no-pty','no-X11-forwarding','no-agent-forwarding',
'no-port-forwarding']
}}
it { should contain_ssh_authorized_key('foo2').with({
'ensure' => 'present',
'type' => 'ssh-dss',
'user' => 'foo2',
'target' => '/home/foo2/.ssh/authorized_keys',
'key' => ssh_key,
'options' => ['command="/usr/bin/date"',
'no-pty','no-X11-forwarding','no-agent-forwarding',
'no-port-forwarding']
})
}
end
end