mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[digitalocean|compute] added list_ssh_keys request tests
This commit is contained in:
parent
3ea97fb23f
commit
fb91eeabab
1 changed files with 21 additions and 0 deletions
21
tests/digitalocean/requests/compute/list_ssh_keys_tests.rb
Normal file
21
tests/digitalocean/requests/compute/list_ssh_keys_tests.rb
Normal 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
|
Loading…
Reference in a new issue