aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/connection/subscriptions_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actioncable/test/connection/subscriptions_test.rb')
-rw-r--r--actioncable/test/connection/subscriptions_test.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/actioncable/test/connection/subscriptions_test.rb b/actioncable/test/connection/subscriptions_test.rb
index 3323785494..902085c5d6 100644
--- a/actioncable/test/connection/subscriptions_test.rb
+++ b/actioncable/test/connection/subscriptions_test.rb
@@ -55,9 +55,11 @@ class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase
subscribe_to_chat_channel
channel = subscribe_to_chat_channel
- channel.expects(:unsubscribe_from_channel)
- @subscriptions.execute_command "command" => "unsubscribe", "identifier" => @chat_identifier
+ assert_called(channel, :unsubscribe_from_channel) do
+ @subscriptions.execute_command "command" => "unsubscribe", "identifier" => @chat_identifier
+ end
+
assert_empty @subscriptions.identifiers
end
end
@@ -92,10 +94,11 @@ class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase
channel2_id = ActiveSupport::JSON.encode(id: 2, channel: "ActionCable::Connection::SubscriptionsTest::ChatChannel")
channel2 = subscribe_to_chat_channel(channel2_id)
- channel1.expects(:unsubscribe_from_channel)
- channel2.expects(:unsubscribe_from_channel)
-
- @subscriptions.unsubscribe_from_all
+ assert_called(channel1, :unsubscribe_from_channel) do
+ assert_called(channel2, :unsubscribe_from_channel) do
+ @subscriptions.unsubscribe_from_all
+ end
+ end
end
end