mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
6500fa46bf
* Request tests for accounts, api_clients, cloud_ips, images, interfaces, server types, user and zones * Added 'ready?' methods to CloudIp and Image models * Reworked brightbox helper to include Format patterns for all of the * Added "hack" to allow select objects to be one class OR NilClass for fields that may be a JSON string or null if unset * Some tests are not enabled (commented out) because they need manual steps (such as uploading Image to your account before registration)
29 lines
877 B
Ruby
29 lines
877 B
Ruby
Shindo.tests('Brightbox::Compute | account requests', ['brightbox']) do
|
|
|
|
tests('success') do
|
|
|
|
tests("#get_account()").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
|
|
Brightbox[:compute].get_account()
|
|
end
|
|
|
|
original_name = Brightbox[:compute].get_account["name"]
|
|
update_args = {:name => "New name from Fog test"}
|
|
tests("#update_account(#{update_args.inspect})").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
|
|
Brightbox[:compute].update_account(update_args)
|
|
end
|
|
Brightbox[:compute].update_account(:name => original_name)
|
|
|
|
tests("#reset_ftp_password_account()").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
|
|
Brightbox[:compute].reset_ftp_password_account()
|
|
end
|
|
|
|
end
|
|
|
|
tests('failure') do
|
|
|
|
tests("#update_account()").returns(nil) do
|
|
Brightbox[:compute].update_account()
|
|
end
|
|
end
|
|
|
|
end
|