Commit 72b59d6e authored by Daniel Juarez's avatar Daniel Juarez Committed by Sean McGivern

Fix comparing equality between `ActionController::Parameters` and a `Hash`....

parent 55cb4bc9
......@@ -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
......
---
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
......
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