aboutsummaryrefslogblamecommitdiffstats
path: root/actioncable/test/stubs/test_adapter.rb
blob: 3b25c9168f625fcd61deb0cdfc46168cf16e692b (plain) (tree)
1
2
3
4
5
6
7
8

                             
                                                             



                                                          
                                                                                                     


                                    
                                                                   

     
# frozen_string_literal: true

class SuccessAdapter < ActionCable::SubscriptionAdapter::Base
  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