debian-mirror-gitlab/spec/support/helpers/features/merge_request_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
575 B
Ruby
Raw Normal View History

2021-02-22 17:27:13 +05:30
# frozen_string_literal: true
2023-06-20 00:43:36 +05:30
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
2021-02-22 17:27:13 +05:30
2023-06-20 00:43:36 +05:30
def serialize_issuable_sidebar(user, project, merge_request)
MergeRequestSerializer
.new(current_user: user, project: project)
.represent(merge_request, serializer: 'sidebar')
2021-02-22 17:27:13 +05:30
end
end
end