diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-07-08 17:56:13 +0300 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-07-08 17:56:13 +0300 |
commit | 0ddbf5c9812d869db7df4473637927edaa0da9b1 (patch) | |
tree | 11953abeeb8b14eac7b50a1219272e3fa56a3743 /tests | |
parent | 830c1f2fbfe560f42912315dc423b30578125905 (diff) |
[stable9.1] Revert invalid commits from master->stable9.1 merge (#25420)
* Revert "Merge pull request #25240 from owncloud/remove-svg"
This reverts commit 8b8d2b679a12f703141de9da71340f1f02151f3d, reversing
changes made to a35747b6fa8f7704bf7333f16a2b867b76acb187.
* Revert "Merge pull request #25253 from owncloud/users-fixotherquotadropdown"
This reverts commit a35747b6fa8f7704bf7333f16a2b867b76acb187, reversing
changes made to a573b6863cbb4eb21feb7fe5a17a9b8fc60cf059.
* Revert "Merge pull request #25314 from owncloud/files_external-backends-config"
This reverts commit a573b6863cbb4eb21feb7fe5a17a9b8fc60cf059, reversing
changes made to 8147eefaeba3822c9331283e973006ad3aeac1f5.
* Revert "Add all properties while creating a subscription (#25318)"
This reverts commit aaf4c3073af2511ab895e982cadae8dc6a143e55.
* Revert "Merge pull request #25276 from owncloud/delete-own-session-token"
This reverts commit e42ce62ce2855c95861eeae669508e5c20f99be4, reversing
changes made to aaf4c3073af2511ab895e982cadae8dc6a143e55.
* Revert "Merge pull request #25262 from owncloud/fed-sharing-error"
This reverts commit 027715f9acba4dc314a7e4c63ac41a58d4e33f22, reversing
changes made to e42ce62ce2855c95861eeae669508e5c20f99be4.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Settings/Controller/AuthSettingsControllerTest.php | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php index 1705cb5ddf1..ee67b221022 100644 --- a/tests/Settings/Controller/AuthSettingsControllerTest.php +++ b/tests/Settings/Controller/AuthSettingsControllerTest.php @@ -24,7 +24,6 @@ namespace Test\Settings\Controller; use OC\AppFramework\Http; use OC\Authentication\Exceptions\InvalidTokenException; -use OC\Authentication\Token\DefaultToken; use OC\Authentication\Token\IToken; use OC\Settings\Controller\AuthSettingsController; use OCP\AppFramework\Http\JSONResponse; @@ -57,17 +56,10 @@ class AuthSettingsControllerTest extends TestCase { } public function testIndex() { - $token1 = new DefaultToken(); - $token1->setId(100); - $token2 = new DefaultToken(); - $token2->setId(200); - $tokens = [ - $token1, - $token2, + $result = [ + 'token1', + 'token2', ]; - $sessionToken = new DefaultToken(); - $sessionToken->setId(100); - $this->userManager->expects($this->once()) ->method('get') ->with($this->uid) @@ -75,31 +67,9 @@ class AuthSettingsControllerTest extends TestCase { $this->tokenProvider->expects($this->once()) ->method('getTokenByUser') ->with($this->user) - ->will($this->returnValue($tokens)); - $this->session->expects($this->once()) - ->method('getId') - ->will($this->returnValue('session123')); - $this->tokenProvider->expects($this->once()) - ->method('getToken') - ->with('session123') - ->will($this->returnValue($sessionToken)); + ->will($this->returnValue($result)); - $this->assertEquals([ - [ - 'id' => 100, - 'name' => null, - 'lastActivity' => null, - 'type' => null, - 'canDelete' => false, - ], - [ - 'id' => 200, - 'name' => null, - 'lastActivity' => null, - 'type' => null, - 'canDelete' => true, - ] - ], $this->controller->index()); + $this->assertEquals($result, $this->controller->index()); } public function testCreate() { @@ -137,7 +107,6 @@ class AuthSettingsControllerTest extends TestCase { $expected = [ 'token' => $newToken, 'deviceToken' => $deviceToken, - 'loginName' => 'User13', ]; $this->assertEquals($expected, $this->controller->create($name)); } |