Commit 44685b15 authored by Kerri Miller's avatar Kerri Miller

Cast incoming access_raw_diffs param to boolean

parent caa86179
......@@ -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