BUGFIX Added RestfulServerTest->testApiAccessBoolean()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@64309 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-10-15 16:19:37 +00:00
parent b9f9e74306
commit 18843624bb

View File

@ -25,6 +25,16 @@ class RestfulServerTest extends SapphireTest {
$this->assertEquals($response->getStatusCode(), 403);
}
public function testApiAccessBoolean() {
$url = "/api/v1/RestfulServerTest_Comment/1";
$response = Director::test($url, null, null, 'GET');
$this->assertContains('<ID>', $response->getBody());
$this->assertContains('<Name>', $response->getBody());
$this->assertContains('<Comment>', $response->getBody());
$this->assertContains('<Page', $response->getBody());
$this->assertContains('<Author', $response->getBody());
}
public function testAuthenticatedGET() {
// @todo create additional mock object with authenticated VIEW permissions
$url = "/api/v1/RestfulServerTest_SecretThing/1";