Sha256: 210903cab14e1530350cec7713c998dbb630746b35425575e2f8152e539cc9c4
Contents?: true
Size: 812 Bytes
Versions: 1
Compression:
Stored size: 812 Bytes
Contents
require "minitest/autorun" require "fog" # Note this is going to be part of fog-xml eventually class Fog::XML::ConnectionTest < Minitest::Test def setup @connection = Fog::XML::Connection.new("http://localhost") end def teardown Excon.stubs.clear end def test_respond_to_request assert_respond_to @connection, :request end def test_request_with_parser @parser = Fog::ToHashDocument.new Excon.stub({}, { :status => 200, :body => "<xml></xml>" }) response = @connection.request(:parser => @parser, :mock => true) assert_equal({ :xml => "" }, response.body) end def test_request_without_parser Excon.stub({}, { :status => 200, :body => "<xml></xml>" }) response = @connection.request(:mock => true) assert_equal("<xml></xml>", response.body) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-1.21.0 | test/fog/xml/connection_test.rb |