From db49e0fdae4d32324e623073d24adfbc6e0a4ac6 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 20 Jan 2019 21:30:51 +0100 Subject: Add canRename & name to tests Signed-off-by: Daniel Kesselberg --- tests/Settings/Controller/AuthSettingsControllerTest.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php index 73741bea57b..f2daef52254 100644 --- a/tests/Settings/Controller/AuthSettingsControllerTest.php +++ b/tests/Settings/Controller/AuthSettingsControllerTest.php @@ -109,7 +109,8 @@ class AuthSettingsControllerTest extends TestCase { 'type' => 0, 'canDelete' => false, 'current' => true, - 'scope' => ['filesystem' => true] + 'scope' => ['filesystem' => true], + 'canRename' => true, ], [ 'id' => 200, @@ -117,7 +118,8 @@ class AuthSettingsControllerTest extends TestCase { 'lastActivity' => 0, 'type' => 0, 'canDelete' => true, - 'scope' => ['filesystem' => true] + 'scope' => ['filesystem' => true], + 'canRename' => true, ] ], $this->controller->index()); } @@ -260,7 +262,7 @@ class AuthSettingsControllerTest extends TestCase { ->method('updateToken') ->with($this->equalTo($token)); - $this->assertSame([], $this->controller->update($tokenId, ['filesystem' => true])); + $this->assertSame([], $this->controller->update($tokenId, ['filesystem' => true], 'App password')); } public function testUpdateTokenWrongUser() { @@ -278,7 +280,7 @@ class AuthSettingsControllerTest extends TestCase { $this->tokenProvider->expects($this->never()) ->method('updateToken'); - $response = $this->controller->update($tokenId, ['filesystem' => true]); + $response = $this->controller->update($tokenId, ['filesystem' => true], 'App password'); $this->assertSame([], $response->getData()); $this->assertSame(\OCP\AppFramework\Http::STATUS_NOT_FOUND, $response->getStatus()); } @@ -292,7 +294,7 @@ class AuthSettingsControllerTest extends TestCase { $this->tokenProvider->expects($this->never()) ->method('updateToken'); - $response = $this->controller->update(42, ['filesystem' => true]); + $response = $this->controller->update(42, ['filesystem' => true], 'App password'); $this->assertSame([], $response->getData()); $this->assertSame(\OCP\AppFramework\Http::STATUS_NOT_FOUND, $response->getStatus()); } -- cgit v1.2.3