Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
4a431a26
Commit
4a431a26
authored
Jul 29, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix that tricky side-effect issue in the test
parent
5fee7ec1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
spec/models/build_spec.rb
spec/models/build_spec.rb
+4
-2
No files found.
app/models/ci/build.rb
View file @
4a431a26
...
...
@@ -460,7 +460,7 @@ module Ci
def
build_attributes_from_config
return
{}
unless
pipeline
.
config_processor
pipeline
.
config_processor
.
build_attributes
(
name
)
end
end
...
...
spec/models/build_spec.rb
View file @
4a431a26
...
...
@@ -275,7 +275,8 @@ describe Ci::Build, models: true do
context
'when yaml_variables are undefined'
do
before
do
build
.
yaml_variables
=
nil
build
.
update
(
yaml_variables:
nil
)
build
.
reload
# reload pipeline so that it resets config_processor
end
context
'use from gitlab-ci.yml'
do
...
...
@@ -854,7 +855,8 @@ describe Ci::Build, models: true do
context
'if is undefined'
do
before
do
build
.
when
=
nil
build
.
update
(
when:
nil
)
build
.
reload
# reload pipeline so that it resets config_processor
end
context
'use from gitlab-ci.yml'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment