2013-10-13 19:50:11 -04:00
|
|
|
Shindo.tests('Compute::VcloudDirector | groups requests', ['vclouddirector']) do
|
|
|
|
|
|
|
|
@service = Fog::Compute::VcloudDirector.new
|
|
|
|
|
2013-10-15 07:41:15 -04:00
|
|
|
tests('#get_groups_from_query') do
|
2013-10-13 19:50:11 -04:00
|
|
|
pending if Fog.mocking?
|
2013-10-15 07:41:15 -04:00
|
|
|
%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
|
2013-10-13 19:50:11 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|