diff options
Diffstat (limited to 'actioncable/test/stubs')
-rw-r--r-- | actioncable/test/stubs/test_adapter.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actioncable/test/stubs/test_adapter.rb b/actioncable/test/stubs/test_adapter.rb index c481046973..5f23a137ea 100644 --- a/actioncable/test/stubs/test_adapter.rb +++ b/actioncable/test/stubs/test_adapter.rb @@ -1,12 +1,16 @@ # frozen_string_literal: true class SuccessAdapter < ActionCable::SubscriptionAdapter::Base + class << self; attr_accessor :subscribe_called, :unsubscribe_called end + def broadcast(channel, payload) end def subscribe(channel, callback, success_callback = nil) + @@subscribe_called = { channel: channel, callback: callback, success_callback: success_callback } end def unsubscribe(channel, callback) + @@unsubscribe_called = { channel: channel, callback: callback } end end |