Sha256: bfb820b13785c9fb3ce14486044560cf0d1c69f000d27ecd4a31fde8d63eb2df
Contents?: true
Size: 1.27 KB
Versions: 2
Compression:
Stored size: 1.27 KB
Contents
require 'rubygems' require 'require_relative' if RUBY_VERSION < '1.9' require_relative File.join('..', 'common.rb') describe Deltacloud::Collections::Drivers do before do def app; run_frontend; end @collection = Deltacloud::Collections.collection(:drivers) end it 'has index operation' do @collection.operation(:index).must_equal Deltacloud::Rabbit::DriversCollection::IndexOperation end it 'has show operation' do @collection.operation(:show).must_equal Deltacloud::Rabbit::DriversCollection::ShowOperation end it 'returns list of drivers in various formats with index operation' do formats.each do |format| header 'Accept', format get root_url + '/drivers' status.must_equal 200 end end it 'returns details about driver in various formats with show operation' do formats.each do |format| header 'Accept', format get root_url + '/drivers/mock' status.must_equal 200 end end it 'properly serialize attributes in JSON' do header 'Accept', 'application/json' get root_url + "/drivers/ec2" status.must_equal 200 json['driver'].wont_be_empty json['driver']['id'].must_equal 'ec2' json['driver']['name'].must_equal 'EC2' json['driver']['entrypoints'].wont_be_empty end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
deltacloud-core-1.1.3 | tests/deltacloud/collections/drivers_collection_test.rb |
deltacloud-core-1.1.2 | tests/deltacloud/collections/drivers_collection_test.rb |