summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-04-18 18:44:30 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-04-23 08:31:23 +0800
commit0e2aaeb83b44878d287f23a9639da4bddb8f4e63 (patch)
tree5b551b73655f2ce59b2034f47307a3e8e0984e33
parent256699519a2b56c332303c0d21cd8ff8f7ef47d7 (diff)
downloadgitlab-ce-0e2aaeb83b44878d287f23a9639da4bddb8f4e63.tar.gz
Fix project auto dev ops failure
-rw-r--r--config/initializers/active_record_build_select.rb2
-rw-r--r--spec/services/projects/update_service_spec.rb2
2 files changed, 4 insertions, 0 deletions
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