Sha256: 1f095959d38567695f29b01d89aaa8a3b9ee2e96b871ee64d081b1bc7442c76c
Contents?: true
Size: 1.18 KB
Versions: 3
Compression:
Stored size: 1.18 KB
Contents
$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..') require 'tests/drivers/openstack/common' module OpenstackTest class RealmsTest < 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_realms get_auth_url '/api;driver=openstack/realms' (last_xml_response/'realms/realm').length.should > 0 end def test_02_each_realm_has_a_name get_auth_url '/api;driver=openstack/realms' (last_xml_response/'realms/realm').each do |profile| (profile/'name').text.should_not == nil (profile/'name').text.should_not == '' (profile/'name').text.should == 'default' end end def test_03_it_returns_single_realm get_auth_url '/api;driver=openstack/realms/us' (last_xml_response/'realm').first[:id].should == 'default' (last_xml_response/'realm/name').first.text.should == 'default' (last_xml_response/'realm/state').first.text.should == 'AVAILABLE' end end end
Version data entries
3 entries across 3 versions & 1 rubygems