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
Boxiang Sun
gitlab-ce
Commits
c6e394bb
Commit
c6e394bb
authored
May 04, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve variable comparison
parent
980fb6fb
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 @
c6e394bb
...
@@ -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 @
c6e394bb
...
@@ -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