From a79cd2a275893635d9ee719495fbb33aa7649497 Mon Sep 17 00:00:00 2001
From: Lin Jen-Shin <godfat@godfat.org>
Date: Wed, 24 Aug 2016 21:09:53 +0800
Subject: [PATCH] No longer needed

---
 spec/models/build_spec.rb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb
index f63183f5df1..ee2c3d04984 100644
--- a/spec/models/build_spec.rb
+++ b/spec/models/build_spec.rb
@@ -275,8 +275,7 @@ describe Ci::Build, models: true do
 
     context 'when yaml_variables are undefined' do
       before do
-        build.update(yaml_variables: nil)
-        build.reload # reload pipeline so that it resets config_processor
+        build.yaml_variables = nil
       end
 
       context 'use from gitlab-ci.yml' do
@@ -902,8 +901,7 @@ describe Ci::Build, models: true do
 
     context 'when `when` is undefined' do
       before do
-        build.update(when: nil)
-        build.reload # reload pipeline so that it resets config_processor
+        build.when = nil
       end
 
       context 'use from gitlab-ci.yml' do
-- 
GitLab