]> source.dussan.org Git - nextcloud-server.git/commitdiff
update tests
authorRobin Appelman <robin@icewind.nl>
Mon, 31 Oct 2016 13:01:31 +0000 (14:01 +0100)
committerRobin Appelman <robin@icewind.nl>
Wed, 16 Nov 2016 14:24:29 +0000 (15:24 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
tests/Settings/Controller/AuthSettingsControllerTest.php

index 9cb49e4eb3f11d52a8c517bbf3459c382484aeca..f3ba2dd9167cfc7eee71b949b9654395c654ae34 100644 (file)
@@ -98,6 +98,7 @@ class AuthSettingsControllerTest extends TestCase {
                                'type' => null,
                                'canDelete' => false,
                                'current' => true,
+                               'scope' => ['filesystem' => true]
                        ],
                        [
                                'id' => 200,
@@ -105,6 +106,7 @@ class AuthSettingsControllerTest extends TestCase {
                                'lastActivity' => null,
                                'type' => null,
                                'canDelete' => true,
+                               'scope' => ['filesystem' => true]
                        ]
                ], $this->controller->index());
        }
@@ -141,9 +143,13 @@ class AuthSettingsControllerTest extends TestCase {
                        ->with($newToken, $this->uid, 'User13', $password, $name, IToken::PERMANENT_TOKEN)
                        ->will($this->returnValue($deviceToken));
 
+               $deviceToken->expects($this->once())
+                       ->method('jsonSerialize')
+                       ->will($this->returnValue(['dummy' => 'dummy', 'canDelete' => true]));
+
                $expected = [
                        'token' => $newToken,
-                       'deviceToken' => $deviceToken,
+                       'deviceToken' => ['dummy' => 'dummy', 'canDelete' => true],
                        'loginName' => 'User13',
                ];
                $this->assertEquals($expected, $this->controller->create($name));