Skip to content

Commit a7042c1

Browse files
author
Oleksii Korshenko
committed
Merge remote-tracking branch 'origin/MAGETWO-70255-PR-10043' into develop-prs
2 parents 2bab207 + 8c87e85 commit a7042c1

File tree

1 file changed

+10
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Cms/Controller

1 file changed

+10
-0
lines changed

dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ public function testViewAction()
1717
$this->assertContains('What are Cookies?', $this->getResponse()->getBody());
1818
}
1919

20+
public function testViewRedirectWithTrailingSlash()
21+
{
22+
$this->dispatch('/enable-cookies/');
23+
$code = $this->getResponse()->getStatusCode();
24+
$location = $this->getResponse()->getHeader('Location')->getFieldValue();
25+
26+
$this->assertEquals(301, $code, 'Invalid response code');
27+
$this->assertStringEndsWith('/enable-cookies', $location, 'Invalid location header');
28+
}
29+
2030
/**
2131
* Test \Magento\Cms\Block\Page::_addBreadcrumbs
2232
*/

0 commit comments

Comments
 (0)