Merge pull request #383 from creative-commoners/pulls/2.1/loosen-json-test

Loosen test assertion on content type for application/json
This commit is contained in:
Guy Marriott 2018-08-20 09:57:26 +12:00 committed by GitHub
commit f24fd60f14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,8 @@ class SubsiteXHRControllerTest extends FunctionalTest
]);
$this->assertEquals(200, $result->getStatusCode());
$this->assertEquals('text/json', $result->getHeader('Content-Type'));
// SilverStripe 4.0-4.2: text/json. >=4.3: application/json
$this->assertContains('json', $result->getHeader('Content-Type'));
$body = $result->getBody();
$this->assertContains('Main site', $body);