|
379 | 379 | 'request_headers' => ['append MirrorID "mirror 12"'], |
380 | 380 | 'rewrites' => [ |
381 | 381 | { |
382 | | - 'rewrite_rule' => ['^index\.html$ welcome.html'], |
| 382 | + 'rewrite_rule' => ['^index\.html$ rewrites.html'], |
383 | 383 | }, |
384 | 384 | ], |
385 | 385 | 'filters' => [ |
|
733 | 733 | } |
734 | 734 | it { is_expected.to contain_concat__fragment('rspec.example.com-redirect') } |
735 | 735 | it { |
736 | | - is_expected.to contain_concat__fragment('rspec.example.com-rewrite').with( |
737 | | - content: %r{^\s+RewriteOptions Inherit$}, |
| 736 | + is_expected.to contain_concat__fragment('rspec.example.com-rewrite') |
| 737 | + .with_content(%r{^\s+RewriteEngine On$}) |
| 738 | + .with_content(%r{^\s+RewriteOptions Inherit$}) |
| 739 | + .with_content(%r{^\s+RewriteBase /}) |
| 740 | + .with_content(%r{^\s+RewriteRule ^index\.html$ welcome.html$}) |
738 | 741 | ) |
739 | 742 | } |
740 | 743 | it { is_expected.to contain_concat__fragment('rspec.example.com-scriptalias') } |
|
1812 | 1815 | end |
1813 | 1816 |
|
1814 | 1817 | it { |
1815 | | - is_expected.to contain_concat__fragment('rspec.example.com-rewrite').with( |
1816 | | - content: %r{^\s+RewriteOptions Inherit$}, |
| 1818 | + is_expected.to contain_concat__fragment('rspec.example.com-rewrite') |
| 1819 | + .with_content(%r{^\s+RewriteOptions Inherit$}) |
| 1820 | + .with_content(%r{^\s+RewriteEngine On$}) |
| 1821 | + .with_content(%r{^\s+RewriteRule ^index\.html$ welcome.html$}) |
| 1822 | + } |
| 1823 | + end |
| 1824 | + context 'empty rewrites_without_rewrite_inherit' do |
| 1825 | + let(:params) do |
| 1826 | + super().merge( |
| 1827 | + 'rewrite_inherit' => false, |
| 1828 | + 'rewrites' => [], |
1817 | 1829 | ) |
| 1830 | + end |
| 1831 | + |
| 1832 | + it { |
| 1833 | + is_expected.to contain_concat__fragment('rspec.example.com-rewrite') |
| 1834 | + .with_content(%r{^\s+RewriteEngine On$}) |
| 1835 | + .with_content(%r{^\s+RewriteRule ^index\.html$ welcome.html$}) |
| 1836 | + .without( content: %r{^\s+RewriteOptions Inherit$}) |
1818 | 1837 | } |
1819 | 1838 | end |
1820 | 1839 |
|
|
0 commit comments