aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/client_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/test/client_test.rb')
-rw-r--r--actioncable/test/client_test.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/actioncable/test/client_test.rb b/actioncable/test/client_test.rb
index ec672a5828..e5f43488c4 100644
--- a/actioncable/test/client_test.rb
+++ b/actioncable/test/client_test.rb
@@ -289,9 +289,10 @@ class ClientTest < ActionCable::TestCase
subscriptions = app.connections.first.subscriptions.send(:subscriptions)
assert_not_equal 0, subscriptions.size, "Missing EchoChannel subscription"
channel = subscriptions.first[1]
- channel.expects(:unsubscribed)
- c.close
- sleep 0.1 # Data takes a moment to process
+ assert_called(channel, :unsubscribed) do
+ c.close
+ sleep 0.1 # Data takes a moment to process
+ end
# All data is removed: No more connection or subscription information!
assert_equal(0, app.connections.count)