diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-02-08 08:34:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-08 08:34:54 +0100 |
commit | b40603d2501059752db43bafb74ef5c11eb57b99 (patch) | |
tree | 9e61588dea11c0278ccd7215625ca62dbdd9f69f /tests | |
parent | dd9428047ecdb820b8b7171cbd1ae51a8a1411b8 (diff) | |
parent | 4532ed356d4815beba2db69b971e05708f9b33ee (diff) | |
download | nextcloud-server-b40603d2501059752db43bafb74ef5c11eb57b99.tar.gz nextcloud-server-b40603d2501059752db43bafb74ef5c11eb57b99.zip |
Merge pull request #13702 from nextcloud/feature/6717/rename-app-passwords
Make it possible to rename app passwords
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Settings/Controller/AuthSettingsControllerTest.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php index 73741bea57b..d0ed40f25b7 100644 --- a/tests/Settings/Controller/AuthSettingsControllerTest.php +++ b/tests/Settings/Controller/AuthSettingsControllerTest.php @@ -1,5 +1,4 @@ <?php - /** * @author Christoph Wurst <christoph@owncloud.com> * @@ -109,7 +108,8 @@ class AuthSettingsControllerTest extends TestCase { 'type' => 0, 'canDelete' => false, 'current' => true, - 'scope' => ['filesystem' => true] + 'scope' => ['filesystem' => true], + 'canRename' => false, ], [ 'id' => 200, @@ -117,7 +117,8 @@ class AuthSettingsControllerTest extends TestCase { 'lastActivity' => 0, 'type' => 0, 'canDelete' => true, - 'scope' => ['filesystem' => true] + 'scope' => ['filesystem' => true], + 'canRename' => true, ] ], $this->controller->index()); } @@ -162,7 +163,7 @@ class AuthSettingsControllerTest extends TestCase { $expected = [ 'token' => $newToken, - 'deviceToken' => ['dummy' => 'dummy', 'canDelete' => true], + 'deviceToken' => ['dummy' => 'dummy', 'canDelete' => true, 'canRename' => true], 'loginName' => 'User13', ]; @@ -260,7 +261,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 +279,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 +293,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()); } |