Commit b487a32c authored by Jarka Kadlecova's avatar Jarka Kadlecova

Address review comments

parent 112d540d
......@@ -4,7 +4,7 @@ class Projects::ServicesController < Projects::ApplicationController
# Authorize
before_action :authorize_admin_project!
before_action :service, only: [:edit, :update, :test]
before_action :build_service, only: [:update, :test]
before_action :update_service, only: [:update, :test]
respond_to :html
......@@ -50,7 +50,7 @@ class Projects::ServicesController < Projects::ApplicationController
end
end
def build_service
def update_service
@service.assign_attributes(service_params[:service])
end
......
......@@ -9,7 +9,7 @@
%p= @service.description
.col-lg-9
= form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'gl-show-field-errors form-horizontal js-integration-settings-form', data: { "can-test" => "#{@service.can_test?}", "test-url" => "#{test_namespace_project_service_path(@project.namespace, @project, @service)}" } }) do |form|
= form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'gl-show-field-errors form-horizontal js-integration-settings-form', data: { 'can-test' => @service.can_test?, 'test-url' => test_namespace_project_service_path } }) do |form|
= render 'shared/service_settings', form: form, subject: @service
.footer-block.row-content-block
%button.btn.btn-save{ type: 'submit' }
......@@ -22,4 +22,4 @@
- disabled_class = 'disabled'
- disabled_title = @service.disabled_title
= link_to "Cancel", namespace_project_settings_integrations_path(@project.namespace, @project), class: "btn btn-cancel"
= link_to 'Cancel', namespace_project_settings_integrations_path(@project.namespace, @project), class: 'btn btn-cancel'
---
title: Simplify test&save actions when setting a service integration
title: Simplify testing and saving service integrations
merge_request: 11599
author:
......@@ -76,7 +76,7 @@ feature 'Setup Jira service', :feature, :js do
end
end
describe 'user sets Jira Service but keeps it non active' do
describe 'user sets Jira Service but keeps it disabled' do
context 'when Jira connection test succeeds' do
it 'activates the JIRA service' do
click_link('JIRA')
......
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