Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-09-18 11:33:19 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-12-19 11:17:06 +0300
commit85c18f598069e033b11897fd43fae42eec2e9692 (patch)
tree550d8adb8a4b0ecf1d5aae484867e839ae6bae41 /tests/lib
parent6859e5a22a862b02ecd8e912b0f09e30560fb0b8 (diff)
Fix duplicate session token after remembered login
On a remembered login session, we create a new session token in the database with the values of the old one. As we actually don't need the old session token anymore, we can delete it right away. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Authentication/Token/DefaultTokenProviderTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
index 2c8c2d7e196..96fdbaa176f 100644
--- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
@@ -318,6 +318,10 @@ class DefaultTokenProviderTest extends TestCase {
->expects($this->at(1))
->method('insert')
->with($newToken);
+ $this->mapper
+ ->expects($this->at(2))
+ ->method('delete')
+ ->with($token);
$this->tokenProvider->renewSessionToken('oldId', 'newId');
}
@@ -384,6 +388,10 @@ class DefaultTokenProviderTest extends TestCase {
->expects($this->at(1))
->method('insert')
->with($this->equalTo($newToken));
+ $this->mapper
+ ->expects($this->at(2))
+ ->method('delete')
+ ->with($token);
$this->tokenProvider->renewSessionToken('oldId', 'newId');
}