Sha256: 84dc55b63d923cafcf25b62d1472e49ae5a8b5d00567dfad5ef3b9bea8590f35
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
require 'rubygems' require 'require_relative' if RUBY_VERSION < '1.9' require 'minitest/autorun' require_relative './common.rb' describe CIMI::Collections::SystemTemplates do before do def app; run_frontend(:cimi) end authorize 'mockuser', 'mockpassword' @collection = CIMI::Collections.collection(:system_templates) end it 'has index operation' do @collection.operation(:index).must_equal CIMI::Rabbit::SystemTemplatesCollection::IndexOperation end it 'has show operation' do @collection.operation(:show).must_equal CIMI::Rabbit::SystemTemplatesCollection::ShowOperation end it 'returns list of system templates in various formats with index operation' do formats.each do |format| header 'Accept', format get root_url + '/system_templates' status.must_equal 200 end end it 'should allow to retrieve the single system template' do get root_url '/system_templates/template1' status.must_equal 200 xml.root.name.must_equal 'SystemTemplate' end it 'should not return non-existing system_template' do get root_url '/system_templates/unknown-system_template' status.must_equal 404 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
deltacloud-core-1.1.2 | tests/cimi/collections/system_templates_test.rb |