2011-06-16 19:28:54 -04:00
|
|
|
Shindo.tests('Fog::Compute[:brightbox] | account requests', ['brightbox']) do
|
2010-12-06 09:50:59 -05:00
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
2010-12-17 19:49:22 -05:00
|
|
|
tests("#get_account").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:brightbox].get_account
|
2010-12-17 19:49:22 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
unless Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
original_name = Fog::Compute[:brightbox].get_account["name"]
|
2010-12-17 19:49:22 -05:00
|
|
|
update_args = {:name => "New name from Fog test"}
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
tests("#update_account(#{update_args.inspect})").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:brightbox].update_account(update_args)
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
|
2010-12-17 19:49:22 -05:00
|
|
|
unless Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:brightbox].update_account(:name => original_name)
|
2010-12-17 19:49:22 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
tests("#reset_ftp_password_account").formats(Brightbox::Compute::Formats::Full::ACCOUNT) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:brightbox].reset_ftp_password_account
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
2011-08-16 12:12:39 -04:00
|
|
|
tests("#update_account").raises(ArgumentError) do
|
2010-12-17 19:49:22 -05:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:brightbox].update_account
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
2010-12-17 19:49:22 -05:00
|
|
|
|
2010-12-06 09:50:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|