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

38 lines
1.1 KiB
Ruby
Raw Normal View History

Shindo.tests('Fog::Compute[:brightbox] | account requests', ['brightbox']) do
tests('success') do
2011-09-29 05:15:03 -04:00
tests("#get_account") do
pending if Fog.mocking?
2011-09-29 05:15:03 -04:00
result = Fog::Compute[:brightbox].get_account
formats(Brightbox::Compute::Formats::Full::ACCOUNT, false) { result }
2011-09-29 05:15:03 -04:00
test("ftp password is blanked") { result["library_ftp_password"].nil? }
end
update_options = {:name => "Fog@#{Time.now.iso8601}"}
2011-09-29 05:15:03 -04:00
tests("#update_account(#{update_options.inspect})") do
pending if Fog.mocking?
2011-09-29 05:15:03 -04:00
result = Fog::Compute[:brightbox].update_account(update_options)
formats(Brightbox::Compute::Formats::Full::ACCOUNT, false) { result }
end
2011-09-29 05:15:03 -04:00
tests("#reset_ftp_password_account") do
pending if Fog.mocking?
2011-09-29 05:15:03 -04:00
result = Fog::Compute[:brightbox].reset_ftp_password_account
formats(Brightbox::Compute::Formats::Full::ACCOUNT, false) { result }
2011-09-29 05:15:03 -04:00
test("new ftp password is visible") { ! result["library_ftp_password"].nil? }
end
end
tests('failure') do
tests("#update_account").raises(ArgumentError) do
pending if Fog.mocking?
Fog::Compute[:brightbox].update_account
end
end
end