Sha256: 7b4d44bc94df4d1d9537e77072c2db80fc9bf288a0296d836be57c61e844573c
Contents?: true
Size: 986 Bytes
Versions: 17
Compression:
Stored size: 986 Bytes
Contents
require 'test_helper' class GeoCerts::APITest < Test::Unit::TestCase context 'GeoCerts::API' do should 'be unauthorized' do managed_server_request :get, '/orders.xml', :response => Responses::Unauthorized do assert_responds_with_exception(GeoCerts::Unauthorized) do GeoCerts::Order.all end end end should 'raise a GeoCerts::RequestTimeout error when the connection times out' do exclusively_mocked_request :get, '/orders.xml', :exception => Timeout::Error do assert_responds_with_exception(GeoCerts::RequestTimeout) do GeoCerts::Order.all end end end should 'raise a GeoCerts::RequestTimeout error when the connection gets reset' do exclusively_mocked_request :get, '/orders.xml', :exception => Errno::ECONNRESET do assert_responds_with_exception(GeoCerts::ConnectionError) do GeoCerts::Order.all end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems