1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[digitalocean|compute] added create_ssh_key mock code

This commit is contained in:
Sergio Rubio 2013-03-18 12:48:27 +01:00
parent dba2408eda
commit 26ae294683

View file

@ -17,7 +17,19 @@ module Fog
class Mock
def create_ssh_key( name, pub_key )
Fog::Mock.not_implemented
response = Excon::Response.new
response.status = 200
mock_data = {
"id" => Fog::Mock.random_numbers(1).to_i,
"name" => name,
"ssh_pub_key" => pub_key
}
response.body = {
"status" => "OK",
"ssh_key" => mock_data
}
self.data[:ssh_keys] << mock_data
response
end
end