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

Remove mock server from servers list on destroy

This commit is contained in:
Trae Robrock 2013-07-24 07:23:06 -07:00
parent 917d469517
commit cc483e1bba
2 changed files with 4 additions and 0 deletions

View file

@ -25,6 +25,9 @@ module Fog
"event_id" => Fog::Mock.random_numbers(1).to_i,
"status" => "OK"
}
server = self.data[:servers].reject! { |s| s['id'] == id }
response
end

View file

@ -7,6 +7,7 @@ Shindo.tests('Fog::Compute[:digitalocean] | destroy_server request', ['digitaloc
test('#destroy_server') do
service.destroy_server(server.id).body['status'] == 'OK'
service.servers.get(server.id) == nil
end
end