Loosen test assertion on content type for application/json

See https://github.com/silverstripe/silverstripe-framework/issues/5594

This was changed in Silverstripe 4.3
This commit is contained in:
Robbie Averill 2018-08-20 09:19:52 +12:00
parent bf2c81dce6
commit 87485e39f4
1 changed files with 2 additions and 1 deletions

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);