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/groups_tests.rb

19 lines
648 B
Ruby
Raw Normal View History

Shindo.tests('Compute::VcloudDirector | groups requests', ['vclouddirector']) do
@service = Fog::Compute::VcloudDirector.new
tests('#get_groups_from_query') do
pending if Fog.mocking?
%w[idrecords records references].each do |format|
tests(":format => #{format}") do
tests('#body').data_matches_schema(VcloudDirector::Compute::Schema::CONTAINER_TYPE) do
@body = @service.get_groups_from_query(:format => format).body
end
key = (format == 'references') ? 'GroupReference' : 'GroupRecord'
tests("#body.key?(:#{key})").returns(true) { @body.key?(key.to_sym) }
end
end
end
end