debian-mirror-gitlab/spec/support/helpers/features/merge_request_helpers.rb
2023-06-20 00:43:36 +05:30

19 lines
575 B
Ruby

# frozen_string_literal: true
module Features
module MergeRequestHelpers
def preload_view_requirements(merge_request, note)
# This will load the status fields of the author of the note and merge request
# to avoid queries when rendering the view being tested.
#
merge_request.author.status
note.author.status
end
def serialize_issuable_sidebar(user, project, merge_request)
MergeRequestSerializer
.new(current_user: user, project: project)
.represent(merge_request, serializer: 'sidebar')
end
end
end