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
f4f66ddb
Commit
f4f66ddb
authored
Feb 22, 2021
by
Pedro Pombeiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure we preserve `#raw` attribute on expansion
parent
cb835578
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
spec/lib/expand_variables_spec.rb
spec/lib/expand_variables_spec.rb
+11
-3
No files found.
spec/lib/expand_variables_spec.rb
View file @
f4f66ddb
...
...
@@ -471,15 +471,23 @@ RSpec.describe ExpandVariables do
end
with_them
do
subject
do
coll
=
Gitlab
::
Ci
::
Variables
::
Collection
.
new
(
variables
)
let!
(
:collection
)
{
Gitlab
::
Ci
::
Variables
::
Collection
.
new
(
variables
)
}
ExpandVariables
.
expand_variables_collection
(
coll
,
project_with_flag_enabled
)
subject!
do
ExpandVariables
.
expand_variables_collection
(
collection
,
project_with_flag_enabled
)
end
it
'expands variables'
do
is_expected
.
to
eq
(
result
)
end
it
'preserves raw attribute'
do
collection
.
each
do
|
v
|
k
=
v
[
:key
]
subject_item
=
subject
.
find
{
|
sv
|
sv
[
:key
]
==
k
}
expect
(
subject_item
.
raw
).
to
eq
(
v
.
raw
)
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