Sha256: 623e7960bc1bc96d1ff94917248b1c6dc06498f2de870a631b396146f881ea71
Contents?: true
Size: 1.56 KB
Versions: 3
Compression:
Stored size: 1.56 KB
Contents
$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..') require 'tests/drivers/rackspace/common' module RackspaceTest class ApiTest < Test::Unit::TestCase include Rack::Test::Methods def app Rack::Builder.new { map '/' do use Rack::Static, :urls => ["/stylesheets", "/javascripts"], :root => "public" run Rack::Cascade.new([Deltacloud::API]) end } end def test_01_it_returns_entry_points get_auth_url '/api;driver=rackspace/?force_auth=1' (last_xml_response/'/api').first[:driver].should == 'rackspace' (last_xml_response/'/api/link').length.should > 0 end def test_02_it_has_rackspace_features get_url '/api;driver=rackspace' features = (last_xml_response/'/api/link[@rel="instances"]/feature').collect { |f| f[:name] } features.include?('user_name').should == true features.include?('authentication_password').should == true features.include?('user_files').should == true features.length.should == 3 end def test_03_it_has_rackspace_collections get_url '/api;driver=rackspace' collections = (last_xml_response/'/api/link').collect { |f| f[:rel] } collections.include?('instance_states').should == true collections.include?('instances').should == true collections.include?('images').should == true collections.include?('buckets').should == true collections.include?('realms').should == true collections.include?('hardware_profiles').should == true collections.length.should == 7 end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
deltacloud-core-1.0.2 | tests/deprecated/drivers/rackspace/api_test.rb |
deltacloud-core-1.0.1 | tests/drivers/rackspace/api_test.rb |
deltacloud-core-1.0.0 | tests/drivers/rackspace/api_test.rb |