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
f2afdc92
Commit
f2afdc92
authored
Dec 19, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test if expanded_environment_name could expand var
with symbols. Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8088#note_20234245
parent
8607383e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
build_spec.rb
spec/models/build_spec.rb
+16
-2
No files found.
spec/models/build_spec.rb
View file @
f2afdc92
...
...
@@ -1306,11 +1306,25 @@ describe Ci::Build, models: true do
describe
'#expanded_environment_name'
do
subject
{
build
.
expanded_environment_name
}
context
'when environment uses variables'
do
let
(
:build
)
{
create
(
:ci_build
,
ref:
'master'
,
environment:
'review/$CI_BUILD_REF_NAME'
)
}
context
'when environment uses $CI_BUILD_REF_NAME'
do
let
(
:build
)
do
create
(
:ci_build
,
ref:
'master'
,
environment:
'review/$CI_BUILD_REF_NAME'
)
end
it
{
is_expected
.
to
eq
(
'review/master'
)
}
end
context
'when environment uses yaml_variables containing symbol keys'
do
let
(
:build
)
do
create
(
:ci_build
,
yaml_variables:
[{
key: :APP_HOST
,
value:
'host'
}],
environment:
'review/$APP_HOST'
)
end
it
{
is_expected
.
to
eq
(
'review/host'
)
}
end
end
describe
'#detailed_status'
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