module ActionCable::Connection::Assertions
def assert_reject_connection(&block)
# Asserts that connection without user_id fails
Asserts that the connection is rejected (via +reject_unauthorized_connection+).
def assert_reject_connection(&block) assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block) end