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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c9f28cad
Commit
c9f28cad
authored
May 04, 2018
by
Matija Čupić
Committed by
Jose
May 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve variable comparison
parent
e96cb240
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
spec/lib/gitlab/ci/pipeline/chain/build_spec.rb
spec/lib/gitlab/ci/pipeline/chain/build_spec.rb
+2
-1
spec/services/ci/create_pipeline_service_spec.rb
spec/services/ci/create_pipeline_service_spec.rb
+2
-3
No files found.
spec/lib/gitlab/ci/pipeline/chain/build_spec.rb
View file @
c9f28cad
...
@@ -44,7 +44,8 @@ describe Gitlab::Ci::Pipeline::Chain::Build do
...
@@ -44,7 +44,8 @@ describe Gitlab::Ci::Pipeline::Chain::Build do
expect
(
pipeline
.
tag
).
to
be
false
expect
(
pipeline
.
tag
).
to
be
false
expect
(
pipeline
.
user
).
to
eq
user
expect
(
pipeline
.
user
).
to
eq
user
expect
(
pipeline
.
project
).
to
eq
project
expect
(
pipeline
.
project
).
to
eq
project
expect
(
pipeline
.
variables
.
size
).
to
eq
variables_attributes
.
count
expect
(
pipeline
.
variables
.
map
{
|
var
|
var
.
slice
(
:key
,
:secret_value
)
})
.
to
eq
variables_attributes
.
map
(
&
:with_indifferent_access
)
end
end
it
'sets a valid config source'
do
it
'sets a valid config source'
do
...
...
spec/services/ci/create_pipeline_service_spec.rb
View file @
c9f28cad
...
@@ -557,9 +557,8 @@ describe Ci::CreatePipelineService do
...
@@ -557,9 +557,8 @@ describe Ci::CreatePipelineService do
subject
{
execute_service
(
variables_attributes:
variables_attributes
)
}
subject
{
execute_service
(
variables_attributes:
variables_attributes
)
}
it
'creates a pipeline with specified variables'
do
it
'creates a pipeline with specified variables'
do
expect
(
subject
.
variables
.
count
).
to
eq
(
variables_attributes
.
count
)
expect
(
subject
.
variables
.
map
{
|
var
|
var
.
slice
(
:key
,
:secret_value
)
})
expect
(
subject
.
variables
.
first
.
key
).
to
eq
(
variables_attributes
.
first
[
:key
])
.
to
eq
variables_attributes
.
map
(
&
:with_indifferent_access
)
expect
(
subject
.
variables
.
last
.
secret_value
).
to
eq
(
variables_attributes
.
last
[
:secret_value
])
end
end
end
end
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