Skip to content

Commit a5826e7

Browse files
committed
Merge branch 'kirtangajjar-add_redirect_tests' into develop
2 parents 169aa94 + efd8072 commit a5826e7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

features/redirect.feature

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,40 @@ Feature: Site Redirection
22

33
Scenario: no_www-no_ssl redirection works properly
44
When I run 'bin/ee site create example.test'
5+
Then After delay of 5 seconds
56
Then Request on 'localhost' with header 'Host: www.example.test' should contain following headers:
67
| header |
78
| HTTP/1.1 301 Moved Permanently |
89
| Location: http://example.test/ |
910

1011
Scenario: www-no_ssl redirection works properly
1112
When I run 'bin/ee site create www.example1.test'
13+
Then After delay of 5 seconds
1214
Then Request on 'localhost' with header 'Host: example1.test' should contain following headers:
1315
| header |
1416
| HTTP/1.1 301 Moved Permanently |
1517
| Location: http://www.example1.test/ |
1618

19+
Scenario: no_www-ssl redirection works properly
20+
When I run 'sudo bin/ee site create example2.test --le [email protected] --skip-status-check'
21+
Then After delay of 5 seconds
22+
Then Request on 'localhost' with header 'Host: www.example2.test' should contain following headers:
23+
| header |
24+
| HTTP/1.1 301 Moved Permanently |
25+
| Location: https://example2.test/ |
26+
And Request on 'https://www.example2.test' with resolve option 'www.example2.test:443:127.0.0.1' should contain following headers:
27+
| header |
28+
| HTTP/1.1 301 Moved Permanently |
29+
| Location: https://example2.test/ |
30+
31+
Scenario: www-ssl redirection works properly
32+
When I run 'sudo bin/ee site create www.example3.test --le [email protected] --skip-status-check'
33+
Then After delay of 5 seconds
34+
Then Request on 'localhost' with header 'Host: example3.test' should contain following headers:
35+
| header |
36+
| HTTP/1.1 301 Moved Permanently |
37+
| Location: https://www.example3.test/ |
38+
And Request on 'https://example3.test/' with resolve option 'example3.test:443:127.0.0.1' should contain following headers:
39+
| header |
40+
| HTTP/1.1 301 Moved Permanently |
41+
| Location: https://www.example3.test/ |

0 commit comments

Comments
 (0)