mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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:
parent
b9f9e74306
commit
18843624bb
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user