diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-18 17:17:24 +0300 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-18 17:25:31 +0300 |
commit | d60cc75d4355be9adf2d6195e49c4e6a96ca336c (patch) | |
tree | 1ad19c4b9061a636a2d126627b1a958d2e398fd2 /spec/models | |
parent | 4a9efc606f5cdd9cf3aa34991543eb2f77555914 (diff) |
Show modified and added public paths in MR
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/environment_status_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/models/environment_status_spec.rb b/spec/models/environment_status_spec.rb index 0fbf949d38e..f2eb263c98c 100644 --- a/spec/models/environment_status_spec.rb +++ b/spec/models/environment_status_spec.rb @@ -30,4 +30,32 @@ describe EnvironmentStatus do it { is_expected.to eq(deployment) } end + + # $ git diff --stat pages-deploy-target...pages-deploy + # .gitlab/route-map.yml | 5 +++++ + # files/html/500.html | 13 ------------- + # files/html/page.html | 3 +++ + # files/js/application.js | 3 +++ + # files/markdown/ruby-style-guide.md | 4 ++++ + # pages-deploy.txt | 1 + + # + # $ cat .gitlab/route-map.yml + # - source: /files\/markdown\/(.+)\.md$/ + # public: '\1.html' + # + # - source: /files\/(.+)/ + # public: '\1' + describe '#changes' do + it 'contains only added and modified public pages' do + expect(environment_status.changes).to contain_exactly( + { + path: 'ruby-style-guide.html', + external_url: "#{environment.external_url}/ruby-style-guide.html" + }, { + path: 'html/page.html', + external_url: "#{environment.external_url}/html/page.html" + } + ) + end + end end |