FIX: Changes needed to respond to whitespace changes.

I’ve made the ContentControllerTest whitespace agnostic, as it’s
possible that we change the whitespace semantics of includes in SS4
and I don’t want to make this test brittle to that.
This commit is contained in:
Sam Minnee 2016-01-07 10:34:01 +13:00
parent bbc3aaaf9f
commit bf6337c59a

View File

@ -149,7 +149,7 @@ class ContentControllerTest extends FunctionalTest {
$page->publish("Stage", "Live"); $page->publish("Stage", "Live");
$response = $self->get($page->RelativeLink()); $response = $self->get($page->RelativeLink());
$self->assertEquals("ContentControllerTestPageWithoutController", $response->getBody()); $self->assertEquals("ContentControllerTestPageWithoutController", trim($response->getBody()));
// // This should fall over to user Page.ss // // This should fall over to user Page.ss
$page = new ContentControllerTestPage(); $page = new ContentControllerTestPage();
@ -158,7 +158,7 @@ class ContentControllerTest extends FunctionalTest {
$page->publish("Stage", "Live"); $page->publish("Stage", "Live");
$response = $self->get($page->RelativeLink()); $response = $self->get($page->RelativeLink());
$self->assertEquals("Page", $response->getBody()); $self->assertEquals("Page", trim($response->getBody()));
// Test that the action template is rendered. // Test that the action template is rendered.
@ -168,12 +168,12 @@ class ContentControllerTest extends FunctionalTest {
$page->publish("Stage", "Live"); $page->publish("Stage", "Live");
$response = $self->get($page->RelativeLink("test")); $response = $self->get($page->RelativeLink("test"));
$self->assertEquals("ContentControllerTestPage_test", $response->getBody()); $self->assertEquals("ContentControllerTestPage_test", trim($response->getBody()));
// Test that an action without a template will default to the index template, which is // Test that an action without a template will default to the index template, which is
// to say the default Page.ss template // to say the default Page.ss template
$response = $self->get($page->RelativeLink("testwithouttemplate")); $response = $self->get($page->RelativeLink("testwithouttemplate"));
$self->assertEquals("Page", $response->getBody()); $self->assertEquals("Page", trim($response->getBody()));
// Test that an action with a template will render the both action template *and* the // Test that an action with a template will render the both action template *and* the
// correct parent template // correct parent template