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

[digitalocean|compute] added get_server_details mock code

This commit is contained in:
Sergio Rubio 2013-03-18 12:49:48 +01:00
parent 9fbf1e8e13
commit 9dbdc392d5

View file

@ -16,7 +16,17 @@ module Fog
class Mock
def get_server_details(server_id)
Fog::Mock.not_implemented
response = Excon::Response.new
response.status = 200
server = self.data[:servers].find { |s| s['id'] == server_id }
response.body = {
"status" => "OK",
"droplet" => self.data[:servers].find { |s| s['id'] == server_id }
}
response
end
end