diff options
author | utilum <oz@utilum.com> | 2018-05-31 17:32:52 +0200 |
---|---|---|
committer | utilum <oz@utilum.com> | 2018-05-31 17:48:20 +0200 |
commit | a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a (patch) | |
tree | ce8a134e1e247d5648771ba9260b16721f2e473e /actioncable/test/channel | |
parent | 84854d9d05c10b091a03767359c3c6ccf4450f26 (diff) | |
download | rails-a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a.tar.gz rails-a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a.tar.bz2 rails-a0ea528b612f9d8cdd14a5b76fdcf6719b7db56a.zip |
Use Ruby instead of mocha
Diffstat (limited to 'actioncable/test/channel')
-rw-r--r-- | actioncable/test/channel/stream_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actioncable/test/channel/stream_test.rb b/actioncable/test/channel/stream_test.rb index dbb53fec1f..ed42f1acd4 100644 --- a/actioncable/test/channel/stream_test.rb +++ b/actioncable/test/channel/stream_test.rb @@ -96,11 +96,17 @@ module ActionCable::StreamTests test "stream_for" do run_in_eventmachine do connection = TestConnection.new - connection.pubsub.expects(:subscribe).with("action_cable:stream_tests:chat:Room#1-Campfire", kind_of(Proc), kind_of(Proc)) channel = ChatChannel.new connection, "" channel.subscribe_to_channel channel.stream_for Room.new(1) + wait_for_async + + pubsub_call = channel.pubsub.class.class_variable_get "@@subscribe_called" + + assert_equal "action_cable:stream_tests:chat:Room#1-Campfire", pubsub_call[:channel] + assert_instance_of Proc, pubsub_call[:callback] + assert_instance_of Proc, pubsub_call[:success_callback] end end |