spec/acceptance/realtime/time_spec.rb in ably-0.8.5 vs spec/acceptance/realtime/time_spec.rb in ably-0.8.6

- old
+ new

@@ -20,8 +20,21 @@ run_reactor do expect(client.time).to be_a(Ably::Util::SafeDeferrable) stop_reactor end end + + context 'with reconfigured HTTP timeout' do + let(:client) do + auto_close Ably::Realtime::Client.new(http_request_timeout: 0.0001, key: api_key, environment: environment, protocol: protocol, log_level: :fatal) + end + + it 'should raise a timeout exception' do + client.time.errback do |error| + expect(error).to be_a Ably::Exceptions::ConnectionTimeout + stop_reactor + end + end + end end end end