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
Léo-Paul Géneau
gitlab-ce
Commits
bb8d0e7c
Commit
bb8d0e7c
authored
Nov 12, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify test
parent
db9ecc76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+9
-14
No files found.
spec/services/ci/create_pipeline_service_spec.rb
View file @
bb8d0e7c
...
...
@@ -387,27 +387,22 @@ describe Ci::CreatePipelineService do
context
'with environment'
do
before
do
config
=
YAML
.
dump
(
deploy:
{
environment:
{
name:
"review/$CI_COMMIT_REF_NAME"
},
script:
'ls'
})
config
=
YAML
.
dump
(
deploy:
{
environment:
{
name:
"review/$CI_COMMIT_REF_NAME"
},
script:
'ls'
,
tags:
[
'hello'
]
})
stub_ci_pipeline_yaml_file
(
config
)
end
it
'creates the environment'
do
it
'creates the environment
with tags
'
do
result
=
execute_service
expect
(
result
).
to
be_persisted
expect
(
Environment
.
find_by
(
name:
"review/master"
)).
to
be_present
end
it
'also has tags'
do
config
=
YAML
.
dump
(
deploy:
{
environment:
{
name:
"review/$CI_COMMIT_REF_NAME"
},
script:
'ls'
,
tags:
[
'hello'
]
})
stub_ci_pipeline_yaml_file
(
config
)
result
=
execute_service
config
=
YAML
.
dump
(
deploy:
{
tags:
[
'hello'
],
script:
[
'ls'
]
})
stub_ci_pipeline_yaml_file
(
config
)
result
=
execute_service
expect
(
Ci
::
Build
.
with_any_tags
.
count
).
to
eq
(
2
)
expect
(
result
.
builds
.
first
.
tag_list
).
to
contain_exactly
(
'hello'
)
end
end
...
...
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