class ActionCable::Connection::SubscriptionsTest
Private Instance Methods
setup_connection()
click to toggle source
# File actioncable/test/connection/subscriptions_test.rb, line 110 def setup_connection env = Rack::MockRequest.env_for "/test", "HTTP_HOST" => "localhost", "HTTP_CONNECTION" => "upgrade", "HTTP_UPGRADE" => "websocket" @connection = Connection.new(@server, env) @subscriptions = ActionCable::Connection::Subscriptions.new(@connection) end
subscribe_to_chat_channel(identifier = @chat_identifier)
click to toggle source
# File actioncable/test/connection/subscriptions_test.rb, line 103 def subscribe_to_chat_channel(identifier = @chat_identifier) @subscriptions.execute_command "command" => "subscribe", "identifier" => identifier assert_equal identifier, @subscriptions.identifiers.last @subscriptions.send :find, "identifier" => identifier end