spec/acceptance/realtime/connection_failures_spec.rb in ably-0.7.1 vs spec/acceptance/realtime/connection_failures_spec.rb in ably-0.7.2

- old
+ new

@@ -125,11 +125,11 @@ end end end context 'when connection state is :suspended' do - it 'enters the failed state after multiple attempts' do + it 'enters the failed state after multiple attempts if the max_time_in_state is set' do connection.on(:connected) { raise 'Connection should not have reached :connected state' } connection.once(:suspended) do count_state_changes && start_timer @@ -395,10 +395,10 @@ end context 'when failing to resume because the connection_key is not or no longer valid' do def kill_connection_transport_and_prevent_valid_resume connection.transport.close_connection_after_writing - connection.update_connection_id_and_key '0123456789abcdef', '0123456789abcdef' # force the resume connection key to be invalid + connection.configure_new '0123456789abcdef', '0123456789abcdef', -1 # force the resume connection key to be invalid end it 'updates the connection_id and connection_key' do connection.once(:connected) do previous_connection_id = connection.id