BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
853b0dff
Commit
853b0dff
authored
Aug 03, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use when instead of if, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620/diffs#note_13540211
parent
62f115dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
build_spec.rb
spec/models/build_spec.rb
+4
-4
No files found.
spec/models/build_spec.rb
View file @
853b0dff
...
...
@@ -853,7 +853,7 @@ describe Ci::Build, models: true do
describe
'#when'
do
subject
{
build
.
when
}
context
'
if
is undefined'
do
context
'
when `when`
is undefined'
do
before
do
build
.
update
(
when:
nil
)
build
.
reload
# reload pipeline so that it resets config_processor
...
...
@@ -864,13 +864,13 @@ describe Ci::Build, models: true do
stub_ci_pipeline_yaml_file
(
config
)
end
context
'
if
config is not found'
do
context
'
when
config is not found'
do
let
(
:config
)
{
nil
}
it
{
is_expected
.
to
eq
(
'on_success'
)
}
end
context
'
if
config does not have a questioned job'
do
context
'
when
config does not have a questioned job'
do
let
(
:config
)
do
YAML
.
dump
({
test_other:
{
...
...
@@ -882,7 +882,7 @@ describe Ci::Build, models: true do
it
{
is_expected
.
to
eq
(
'on_success'
)
}
end
context
'
if
config has when'
do
context
'
when
config has when'
do
let
(
:config
)
do
YAML
.
dump
({
test:
{
...
...
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