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

40 lines
1.1 KiB
Ruby

Shindo.tests('Fog::Compute[:brightbox] | account requests', ['brightbox']) do
tests('success') do
tests("#get_account").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
pending if Fog.mocking?
Fog::Compute[:brightbox].get_account
end
unless Fog.mocking?
original_name = Fog::Compute[:brightbox].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?
Fog::Compute[:brightbox].update_account(update_args)
end
unless Fog.mocking?
Fog::Compute[:brightbox].update_account(:name => original_name)
end
tests("#reset_ftp_password_account").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
pending if Fog.mocking?
Fog::Compute[:brightbox].reset_ftp_password_account
end
end
tests('failure') do
tests("#update_account").returns(nil) do
pending if Fog.mocking?
Fog::Compute[:brightbox].update_account
end
end
end