[digitalocean|compute] added list_ssh_keys request tests

This commit is contained in:
Sergio Rubio 2013-03-18 12:53:37 +01:00
parent 3ea97fb23f
commit fb91eeabab
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
Shindo.tests('Fog::Compute[:digitalocean] | list_ssh_keys request', ['digitalocean', 'compute']) do
@ssh_key_format = {
'id' => Integer,
'name' => String
}
tests('success') do
tests('#list_ssh_keys') do
Fog::Compute[:digitalocean].create_ssh_key 'fookey', 'ssh-dss FOO'
Fog::Compute[:digitalocean].list_ssh_keys.body['ssh_keys'].each do |key|
tests('format').data_matches_schema(@ssh_key_format) do
key
end
end
end
end
end