Fix comparing equality between `ActionController::Parameters` and a `Hash`....
This commit is contained in:
parent
55cb4bc9ca
commit
72b59d6e3b
|
@ -72,7 +72,7 @@ module ServiceParams
|
|||
dynamic_params = @service.event_channel_names + @service.event_names # rubocop:disable Gitlab/ModuleWithInstanceVariables
|
||||
service_params = params.permit(:id, service: allowed_service_params + dynamic_params)
|
||||
|
||||
if service_params[:service].is_a?(Hash)
|
||||
if service_params[:service].is_a?(ActionController::Parameters)
|
||||
FILTER_BLANK_PARAMS.each do |param|
|
||||
service_params[:service].delete(param) if service_params[:service][param].blank?
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix Jira Service password validation on project integration services.
|
||||
merge_request: 24896
|
||||
author: Daniel Juarez
|
||||
type: fixed
|
|
@ -152,6 +152,16 @@ describe Projects::ServicesController do
|
|||
expect(service.namespace).not_to eq('updated_namespace')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when activating JIRA service from a template' do
|
||||
let(:template_service) { create(:jira_service, project: project, template: true) }
|
||||
|
||||
it 'activate JIRA service from template' do
|
||||
put :update, params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: true } }
|
||||
|
||||
expect(flash[:notice]).to eq 'JIRA activated.'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #edit" do
|
||||
|
|
Loading…
Reference in New Issue