aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-06-13 16:00:49 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-06-13 19:44:05 +0200
commit465807490d7648e5675f1cdbc5b1d232cda4feee (patch)
treeb00e74e21eef32523bc3ff63247865daa087a94e /apps
parent331d88bcabd4a66b0efc89fa28b90d26e88f4637 (diff)
downloadnextcloud-server-465807490d7648e5675f1cdbc5b1d232cda4feee.tar.gz
nextcloud-server-465807490d7648e5675f1cdbc5b1d232cda4feee.zip
create session token only for clients that support cookies
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/AuthTest.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php
index b3ab49a027e..147a0c2b8c5 100644
--- a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php
@@ -159,7 +159,7 @@ class AuthTest extends TestCase {
$user = $this->getMockBuilder('\OCP\IUser')
->disableOriginalConstructor()
->getMock();
- $user->expects($this->exactly(4))
+ $user->expects($this->exactly(3))
->method('getUID')
->will($this->returnValue('MyTestUser'));
$this->userSession
@@ -167,7 +167,7 @@ class AuthTest extends TestCase {
->method('isLoggedIn')
->will($this->returnValue(true));
$this->userSession
- ->expects($this->exactly(4))
+ ->expects($this->exactly(3))
->method('getUser')
->will($this->returnValue($user));
$this->session
@@ -178,12 +178,8 @@ class AuthTest extends TestCase {
$this->userSession
->expects($this->once())
->method('logClientIn')
- ->with('MyTestUser', 'MyTestPassword')
+ ->with('MyTestUser', 'MyTestPassword', $this->request)
->will($this->returnValue(true));
- $this->userSession
- ->expects($this->once())
- ->method('createSessionToken')
- ->with($this->request, 'MyTestUser', 'MyTestUser', 'MyTestPassword');
$this->session
->expects($this->once())
->method('set')
@@ -626,17 +622,14 @@ class AuthTest extends TestCase {
->method('logClientIn')
->with('username', 'password')
->will($this->returnValue(true));
- $this->userSession
- ->expects($this->once())
- ->method('createSessionToken');
$user = $this->getMockBuilder('\OCP\IUser')
->disableOriginalConstructor()
->getMock();
- $user->expects($this->exactly(4))
+ $user->expects($this->exactly(3))
->method('getUID')
->will($this->returnValue('MyTestUser'));
$this->userSession
- ->expects($this->exactly(4))
+ ->expects($this->exactly(3))
->method('getUser')
->will($this->returnValue($user));
$response = $this->auth->check($server->httpRequest, $server->httpResponse);