tests/rackspace/queues_tests.rb in fog-maestrodev-1.19.0.20140212012611 vs tests/rackspace/queues_tests.rb in fog-maestrodev-1.20.0.20140305101305

- old
+ new

@@ -1,10 +1,7 @@ Shindo.tests('Fog::Rackspace::Queues', ['rackspace']) do - pending if Fog.mocking? - - def assert_method(url, method) @service.instance_variable_set "@rackspace_auth_url", url returns(method) { @service.send :authentication_method } end @@ -23,20 +20,16 @@ assert_method 'https://lon.identity.api.rackspacecloud.com/v1.1', :authenticate_v1 assert_method 'https://lon.identity.api.rackspacecloud.com/v2.0', :authenticate_v2 end tests('authentication v1') do - pending if Fog.mocking? - raises(Fog::Errors::NotImplemented) do @service = Fog::Rackspace::Queues.new :rackspace_auth_url => 'https://identity.api.rackspacecloud.com/v1.0' end end tests('authentication v2') do - pending if Fog.mocking? - tests('variables populated').succeeds do @service = Fog::Rackspace::Queues.new :rackspace_auth_url => 'https://identity.api.rackspacecloud.com/v2.0', :connection_options => { :ssl_verify_peer => true } returns(true, "auth token populated") { !@service.send(:auth_token).nil? } returns(false, "path populated") { @service.instance_variable_get("@uri").nil? } @@ -61,12 +54,10 @@ @service.queues end end tests('default auth') do - pending if Fog.mocking? - tests('no params').succeeds do #We consistently use DFW as our default but queues doesn't have a DFW default region yet. # We can enable this test once they have a DFW region (which they will) pending @service = Fog::Rackspace::Queues.new @@ -81,12 +72,10 @@ @service.queues end end tests('reauthentication') do - pending if Fog.mocking? - @service = Fog::Rackspace::Queues.new returns(true, "auth token populated") { !@service.send(:auth_token).nil? } @service.instance_variable_set("@auth_token", "bad_token") returns(true, 'list queues call succeeds') { [200, 204].include?(@service.list_queues.status) } end @@ -97,11 +86,9 @@ data = @service.queues returns(true) { data.is_a? Array } end tests('client_id') do - pending if Fog.mocking? - tests('should generate uuid if a client id is not provided').succeeds do pending unless Fog::UUID.supported? service = Fog::Rackspace::Queues.new service.client_id =~ /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/ end