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:
parent
917d469517
commit
cc483e1bba
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue