Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-08-23 11:49:35 +0300
committerDouwe Maan <douwe@gitlab.com>2017-08-23 11:49:35 +0300
commit459631acdbbfabe1eadda8feb45d49d4a0c3e412 (patch)
tree41e852bdd5710a8c3ed5369b73f5e112d44a2db9 /app
parent0f74ba967296cfb2e2ae65328f93170f453ab687 (diff)
parente6880ebc7d399627d6b77fb3483b8e7157932313 (diff)
Merge branch 'fix-broken-testing-of-some-integrations' into 'master'
Fix inability to test some project integrations Closes gitlab-ee#3194 See merge request !13729
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/services_controller.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb
index d54a1111f11..daa5c88aae0 100644
--- a/app/controllers/projects/services_controller.rb
+++ b/app/controllers/projects/services_controller.rb
@@ -4,7 +4,6 @@ class Projects::ServicesController < Projects::ApplicationController
# Authorize
before_action :authorize_admin_project!
before_action :service, only: [:edit, :update, :test]
- before_action :update_service, only: [:update, :test]
respond_to :html
@@ -14,6 +13,8 @@ class Projects::ServicesController < Projects::ApplicationController
end
def update
+ @service.attributes = service_params[:service]
+
if @service.save(context: :manual_change)
redirect_to(project_settings_integrations_path(@project), notice: success_message)
else
@@ -24,7 +25,7 @@ class Projects::ServicesController < Projects::ApplicationController
def test
message = {}
- if @service.can_test?
+ if @service.can_test? && @service.update_attributes(service_params[:service])
data = @service.test_data(project, current_user)
outcome = @service.test(data)
@@ -50,10 +51,6 @@ class Projects::ServicesController < Projects::ApplicationController
end
end
- def update_service
- @service.assign_attributes(service_params[:service])
- end
-
def service
@service ||= @project.find_or_initialize_service(params[:id])
end