1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/compute/requests/brightbox/account_tests.rb
2011-01-03 13:34:08 -08:00

40 lines
1 KiB
Ruby

Shindo.tests('Brightbox::Compute | account requests', ['brightbox']) do
tests('success') do
tests("#get_account").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
pending if Fog.mocking?
Brightbox[:compute].get_account
end
unless Fog.mocking?
original_name = Brightbox[:compute].get_account["name"]
update_args = {:name => "New name from Fog test"}
end
tests("#update_account(#{update_args.inspect})").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
pending if Fog.mocking?
Brightbox[:compute].update_account(update_args)
end
unless Fog.mocking?
Brightbox[:compute].update_account(:name => original_name)
end
tests("#reset_ftp_password_account").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
pending if Fog.mocking?
Brightbox[:compute].reset_ftp_password_account
end
end
tests('failure') do
tests("#update_account").returns(nil) do
pending if Fog.mocking?
Brightbox[:compute].update_account
end
end
end