Commit 53332c5c authored by Stan Hu's avatar Stan Hu

Merge branch 'kerrizor/cast-access_raw_diffs-to-boolean' into 'master'

Cast incoming access_raw_diffs param to boolean

See merge request gitlab-org/gitlab!53285
parents dd9fea06 44685b15
......@@ -361,7 +361,7 @@ module API
with: Entities::MergeRequestChanges,
current_user: current_user,
project: user_project,
access_raw_diffs: params.fetch(:access_raw_diffs, false)
access_raw_diffs: to_boolean(params.fetch(:access_raw_diffs, false))
end
desc 'Get the merge request pipelines' do
......
......@@ -1542,9 +1542,9 @@ RSpec.describe API::MergeRequests do
end
end
context 'when access_raw_diffs is passed as an option' do
context 'when access_raw_diffs is true' do
it_behaves_like 'accesses diffs via raw_diffs' do
let(:params) { { access_raw_diffs: true } }
let(:params) { { access_raw_diffs: "true" } }
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment