class ActionCable::Connection::IdentifierTest
Private Instance Methods
close_connection()
click to toggle source
# File actioncable/test/connection/identifier_test.rb, line 74 def close_connection @connection.send :handle_close end
open_connection(server:)
click to toggle source
# File actioncable/test/connection/identifier_test.rb, line 66 def open_connection(server:) env = Rack::MockRequest.env_for "/test", "HTTP_HOST" => "localhost", "HTTP_CONNECTION" => "upgrade", "HTTP_UPGRADE" => "websocket" @connection = Connection.new(server, env) @connection.process @connection.send :handle_open end
open_connection_with_stubbed_pubsub()
click to toggle source
# File actioncable/test/connection/identifier_test.rb, line 59 def open_connection_with_stubbed_pubsub server = TestServer.new server.stubs(:adapter).returns(stub_everything("adapter")) open_connection server: server end