Merge branch 'sh-fix-import-url-update' into 'master'
Fix project settings not being able to update Closes #62708 See merge request gitlab-org/gitlab-ce!29097
This commit is contained in:
commit
3bce929fd1
3 changed files with 19 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
module ImportUrlParams
|
||||
def import_url_params
|
||||
return {} unless params.dig(:project, :import_url).present?
|
||||
|
||||
{ import_url: import_params_to_full_url(params[:project]) }
|
||||
end
|
||||
|
||||
|
|
5
changelogs/unreleased/sh-fix-import-url-update.yml
Normal file
5
changelogs/unreleased/sh-fix-import-url-update.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix project settings not being able to update
|
||||
merge_request: 29097
|
||||
author:
|
||||
type: fixed
|
|
@ -8,6 +8,18 @@ describe ImportUrlParams do
|
|||
controller.import_url_params
|
||||
end
|
||||
|
||||
context 'empty URL' do
|
||||
let(:params) do
|
||||
ActionController::Parameters.new(project: {
|
||||
title: 'Test'
|
||||
})
|
||||
end
|
||||
|
||||
it 'returns empty hash' do
|
||||
expect(import_url_params).to eq({})
|
||||
end
|
||||
end
|
||||
|
||||
context 'url and password separately provided' do
|
||||
let(:params) do
|
||||
ActionController::Parameters.new(project: {
|
||||
|
|
Loading…
Reference in a new issue