1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/vcloud_director/requests/compute/task_tests.rb
Nick Osborn dc2006769b [vcloud_director] Request method renaming.
This renames most request methods in line with page names in the vCloud
API documentation. Previous method names remain as deprecations.
2013-10-01 08:43:28 +01:00

19 lines
684 B
Ruby

Shindo.tests('Compute::VcloudDirector | task requests', ['vclouddirector']) do
@service = Fog::Compute::VcloudDirector.new
tests('get current organization') do
session = @service.get_current_session.body
org_href = session[:Link].detect {|l| l[:type] == 'application/vnd.vmware.vcloud.org+xml'}[:href]
@org_uuid = org_href.split('/').last
end
tests('#get_task_list').data_matches_schema(VcloudDirector::Compute::Schema::TASKS_LIST_TYPE) do
@tasks_list = @service.get_task_list(@org_uuid).body
end
tests('retrieve non-existent TasksList').raises(Excon::Errors::Forbidden) do
@service.get_task_list('00000000-0000-0000-0000-000000000000')
end
end