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
e288a7cb
Commit
e288a7cb
authored
Mar 11, 2020
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use multiple values in list-type CI variable spec
parent
9f58e158
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+21
-2
No files found.
spec/models/ci/build_spec.rb
View file @
e288a7cb
...
@@ -2542,6 +2542,8 @@ describe Ci::Build do
...
@@ -2542,6 +2542,8 @@ describe Ci::Build do
<<~
ROUTEMAP
<<~
ROUTEMAP
- source: 'bar/branch-test.txt'
- source: 'bar/branch-test.txt'
public: '/bar/branches'
public: '/bar/branches'
- source: 'with space/README.md'
public: '/README'
ROUTEMAP
ROUTEMAP
end
end
...
@@ -2556,10 +2558,27 @@ describe Ci::Build do
...
@@ -2556,10 +2558,27 @@ describe Ci::Build do
let
(
:environment
)
{
create
(
:environment
,
project:
merge_request
.
project
,
name:
"foo-
#{
project
.
default_branch
}
"
)
}
let
(
:environment
)
{
create
(
:environment
,
project:
merge_request
.
project
,
name:
"foo-
#{
project
.
default_branch
}
"
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
environment:
environment
.
name
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
,
environment:
environment
.
name
)
}
let
(
:full_urls
)
do
[
File
.
join
(
environment
.
external_url
,
'/bar/branches'
),
File
.
join
(
environment
.
external_url
,
'/README'
)
]
end
it
'populates CI_MERGE_REQUEST_CHANGED_PAGES_* variables'
do
it
'populates CI_MERGE_REQUEST_CHANGED_PAGES_* variables'
do
expect
(
subject
).
to
include
(
expect
(
subject
).
to
include
(
{
key:
'CI_MERGE_REQUEST_CHANGED_PAGE_PATHS'
,
value:
'/bar/branches'
,
public:
true
,
masked:
false
},
{
{
key:
'CI_MERGE_REQUEST_CHANGED_PAGE_URLS'
,
value:
File
.
join
(
environment
.
external_url
,
'/bar/branches'
),
public:
true
,
masked:
false
}
key:
'CI_MERGE_REQUEST_CHANGED_PAGE_PATHS'
,
value:
'/bar/branches,/README'
,
public:
true
,
masked:
false
},
{
key:
'CI_MERGE_REQUEST_CHANGED_PAGE_URLS'
,
value:
full_urls
.
join
(
','
),
public:
true
,
masked:
false
}
)
)
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