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
2013-10-08 18:59:23 +01:00

16 lines
638 B
Ruby

Shindo.tests('Compute::VcloudDirector | task requests', ['vclouddirector']) do
@service = Fog::Compute::VcloudDirector.new
tests('#get_task_list').data_matches_schema(VcloudDirector::Compute::Schema::TASKS_LIST_TYPE) 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
@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