Skip to content

Commit

Permalink
MAGETWO-70255: Fix trailing slash used in url rewrites magento#10043
Browse files Browse the repository at this point in the history
 - added integration tests for CMS pages
  • Loading branch information
Oleksii Korshenko committed Jun 29, 2017
1 parent 82e5ebe commit 8f031d0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ public function testViewAction()
$this->assertContains('What are Cookies?', $this->getResponse()->getBody());
}

public function testViewRedirectWithTrailingSlash()
{
$this->dispatch('/enable-cookies/');
$code = $this->getResponse()->getStatusCode();
$location = $this->getResponse()->getHeader('Location')->getFieldValue();

$this->assertEquals(301, $code, 'Invalid response code');
$this->assertStringEndsWith('/enable-cookies', $location, 'Invalid location header');
}

/**
* Test \Magento\Cms\Block\Page::_addBreadcrumbs
*/
Expand Down

0 comments on commit 8f031d0

Please sign in to comment.