mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-01 16:04:19 +00:00
14 lines
435 B
Ruby
14 lines
435 B
Ruby
# frozen_string_literal: true
|
|
|
|
module StubActionCableConnection
|
|
def stub_action_cable_connection(
|
|
current_user: nil,
|
|
access_token: nil,
|
|
request: ActionDispatch::TestRequest.create,
|
|
current_organization: nil
|
|
)
|
|
request.headers['Authorization'] = "Bearer #{access_token.token}" if access_token
|
|
stub_connection(current_user: current_user, request: request, current_organization: current_organization)
|
|
end
|
|
end
|