Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions spec/acceptance/realtime/channel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2224,6 +2224,27 @@ def fake_error(error)
channel.transition_state_machine! :suspended
end
end

context 'when connection is no longer connected' do
it 'will not attempt to reattach (#RTL13c)' do
channel.attach do
connection.once(:closing) do
channel.once(:attaching) do |state_change|
raise 'Channel should not attempt to reattach'
end

channel.transition_state_machine! :suspended
end

connection.once(:closed) do
expect(channel).to be_suspended
stop_reactor
end

connection.close
end
end
end
end

context 'and channel is attaching' do
Expand Down