blob: 53896e1fe12d9f7c0e2056da8c8da9a346889d29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
module Spec
module Support
module Helpers
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
end
end
end
|