1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/spec/rackspace/requests/servers/delete_server_spec.rb
2009-11-03 21:46:27 -08:00

27 lines
No EOL
621 B
Ruby

require File.dirname(__FILE__) + '/../../../spec_helper'
describe 'Rackspace::Servers.delete_server' do
describe 'success' do
before(:each) do
# flavor 1 = 256, image 3 = gentoo 2008.0
@server_id = servers.create_server(1, 3).body['server']['id']
end
it "should return proper attributes" do
eventually do
servers.delete_server(@server_id)
end
end
end
describe 'failure' do
it "should raise a NotFound error if the server does not exist" do
lambda {
servers.delete_server(0)
}.should raise_error(Excon::Errors::NotFound)
end
end
end