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
iv
gitlab-ce
Commits
bdb06fa0
Commit
bdb06fa0
authored
Apr 15, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve build specs for job environment variables
parent
1f324864
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
spec/models/build_spec.rb
spec/models/build_spec.rb
+5
-2
No files found.
spec/models/build_spec.rb
View file @
bdb06fa0
...
@@ -240,8 +240,11 @@ describe Ci::Build, models: true do
...
@@ -240,8 +240,11 @@ describe Ci::Build, models: true do
end
end
context
'when job variables are defined'
do
context
'when job variables are defined'
do
##
# Job-level variables are defined in gitlab_ci.yml fixture
#
context
'when job variables are unique'
do
context
'when job variables are unique'
do
before
{
allow
(
build
).
to
receive
(
:name
)
{
'staging'
}
}
let
(
:build
)
{
create
(
:ci_build
,
name:
'staging'
)
}
it
'includes job variables'
do
it
'includes job variables'
do
expect
(
subject
).
to
include
(
expect
(
subject
).
to
include
(
...
@@ -252,7 +255,7 @@ describe Ci::Build, models: true do
...
@@ -252,7 +255,7 @@ describe Ci::Build, models: true do
end
end
context
'when job variable has same key other variable has'
do
context
'when job variable has same key other variable has'
do
before
{
allow
(
build
).
to
receive
(
:name
)
{
'production'
}
}
let
(
:build
)
{
create
(
:ci_build
,
name:
'production'
)
}
it
'contains job yaml variable'
do
it
'contains job yaml variable'
do
expect
(
subject
).
to
include
(
key: :DB_NAME
,
value:
'mysql'
,
expect
(
subject
).
to
include
(
key: :DB_NAME
,
value:
'mysql'
,
...
...
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