summaryrefslogtreecommitdiff
path: root/spec/models/ci/build_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 12:09:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 12:09:17 +0000
commitcd52759ee33051b8ad7b88b02ba7954e4fad7018 (patch)
treef1096c68e457aef7f5201acd16e4a751ff538026 /spec/models/ci/build_spec.rb
parent18f7828977b74bf6e5153594a098ef90e773b3b7 (diff)
downloadgitlab-ce-cd52759ee33051b8ad7b88b02ba7954e4fad7018.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci/build_spec.rb')
-rw-r--r--spec/models/ci/build_spec.rb23
1 files changed, 21 insertions, 2 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 757c158e16a..6c77b16f908 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -2542,6 +2542,8 @@ describe Ci::Build do
<<~ROUTEMAP
- source: 'bar/branch-test.txt'
public: '/bar/branches'
+ - source: 'with space/README.md'
+ public: '/README'
ROUTEMAP
end
@@ -2556,10 +2558,27 @@ describe Ci::Build do
let(:environment) { create(:environment, project: merge_request.project, name: "foo-#{project.default_branch}") }
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
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