summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/appframework/controller/OCSControllerTest.php12
-rw-r--r--tests/lib/appframework/http/OCSResponseTest.php5
2 files changed, 10 insertions, 7 deletions
diff --git a/tests/lib/appframework/controller/OCSControllerTest.php b/tests/lib/appframework/controller/OCSControllerTest.php
index 11a9d45eb92..92b092cf0e9 100644
--- a/tests/lib/appframework/controller/OCSControllerTest.php
+++ b/tests/lib/appframework/controller/OCSControllerTest.php
@@ -69,9 +69,11 @@ class OCSControllerTest extends \Test\TestCase {
$expected = "<?xml version=\"1.0\"?>\n" .
"<ocs>\n" .
" <meta>\n" .
- " <status>OK</status>\n" .
+ " <status>failure</status>\n" .
" <statuscode>400</statuscode>\n" .
" <message>OK</message>\n" .
+ " <totalitems></totalitems>\n" .
+ " <itemsperpage></itemsperpage>\n" .
" </meta>\n" .
" <data>\n" .
" <test>hi</test>\n" .
@@ -99,9 +101,11 @@ class OCSControllerTest extends \Test\TestCase {
$expected = "<?xml version=\"1.0\"?>\n" .
"<ocs>\n" .
" <meta>\n" .
- " <status>OK</status>\n" .
+ " <status>failure</status>\n" .
" <statuscode>400</statuscode>\n" .
" <message>OK</message>\n" .
+ " <totalitems></totalitems>\n" .
+ " <itemsperpage></itemsperpage>\n" .
" </meta>\n" .
" <data>\n" .
" <test>hi</test>\n" .
@@ -126,8 +130,8 @@ class OCSControllerTest extends \Test\TestCase {
$this->getMock('\OCP\Security\ISecureRandom'),
$this->getMock('\OCP\IConfig')
));
- $expected = '{"status":"OK","statuscode":400,"message":"OK",' .
- '"totalitems":"","itemsperpage":"","data":{"test":"hi"}}';
+ $expected = '{"ocs":{"meta":{"status":"failure","statuscode":400,"message":"OK",' .
+ '"totalitems":"","itemsperpage":""},"data":{"test":"hi"}}}';
$params = [
'data' => [
'test' => 'hi'
diff --git a/tests/lib/appframework/http/OCSResponseTest.php b/tests/lib/appframework/http/OCSResponseTest.php
index 111dc7ad0a3..1ca3e330bad 100644
--- a/tests/lib/appframework/http/OCSResponseTest.php
+++ b/tests/lib/appframework/http/OCSResponseTest.php
@@ -47,14 +47,13 @@ class OCSResponseTest extends \Test\TestCase {
public function testRender() {
$response = new OCSResponse(
- 'xml', 'status', 2, 'message', ['test' => 'hi'], 'tag', 'abc',
- 'dynamic', 3, 4
+ 'xml', 2, 'message', ['test' => 'hi'], 3, 4
);
$out = $response->render();
$expected = "<?xml version=\"1.0\"?>\n" .
"<ocs>\n" .
" <meta>\n" .
- " <status>status</status>\n" .
+ " <status>failure</status>\n" .
" <statuscode>2</statuscode>\n" .
" <message>message</message>\n" .
" <totalitems>3</totalitems>\n" .