From 0e2aaeb83b44878d287f23a9639da4bddb8f4e63 Mon Sep 17 00:00:00 2001 From: Heinrich Lee Yu Date: Thu, 18 Apr 2019 18:44:30 +0800 Subject: [PATCH] Fix project auto dev ops failure --- config/initializers/active_record_build_select.rb | 2 ++ spec/services/projects/update_service_spec.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config/initializers/active_record_build_select.rb b/config/initializers/active_record_build_select.rb index d072f272e3c..ab5a872cac6 100644 --- a/config/initializers/active_record_build_select.rb +++ b/config/initializers/active_record_build_select.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Gitlab/ModuleWithInstanceVariables # build_select only selects the required fields if the model has ignored_columns. diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index c37147e7d3b..5ad30b58511 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -440,6 +440,8 @@ describe Projects::UpdateService do context 'when auto devops is set to instance setting' do before do project.create_auto_devops!(enabled: nil) + project.reload + allow(project.auto_devops).to receive(:previous_changes).and_return('enabled' => true) end