aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorMario Danic <mario@lovelyhq.com>2017-11-09 00:29:34 +0100
committerMario Danic <mario@lovelyhq.com>2017-11-09 00:29:34 +0100
commitc2cd5fc5d345a61b6cc251d2974f199f4e8c04f8 (patch)
tree1da215a5c442419fe8c4886cfb3d8d11a6d46575 /tests/Core
parent989a8a3668ee2f8214bc0391b8d38f1e9b99bde0 (diff)
downloadnextcloud-server-c2cd5fc5d345a61b6cc251d2974f199f4e8c04f8.tar.gz
nextcloud-server-c2cd5fc5d345a61b6cc251d2974f199f4e8c04f8.zip
Fix flow
Signed-off-by: Mario Danic <mario@lovelyhq.com>
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index 99388e2c441..d2dec685737 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -160,6 +160,10 @@ class ClientFlowLoginControllerTest extends TestCase {
->willReturn('ExampleCloud');
$this->request
->expects($this->once())
+ ->method('getServerProtocol')
+ ->willReturn('http');
+ $this->request
+ ->expects($this->once())
->method('getServerHost')
->willReturn('example.com');
@@ -216,6 +220,10 @@ class ClientFlowLoginControllerTest extends TestCase {
->willReturn('ExampleCloud');
$this->request
->expects($this->once())
+ ->method('getServerProtocol')
+ ->willReturn('http');
+ $this->request
+ ->expects($this->once())
->method('getServerHost')
->willReturn('example.com');
@@ -425,10 +433,14 @@ class ClientFlowLoginControllerTest extends TestCase {
);
$this->request
->expects($this->once())
+ ->method('getServerProtocol')
+ ->willReturn('http');
+ $this->request
+ ->expects($this->once())
->method('getServerHost')
->willReturn('example.com');
- $expected = new Http\RedirectResponse('nc://login/server:example.com&user:MyLoginName&password:MyGeneratedToken');
+ $expected = new Http\RedirectResponse('nc://login/server:http://example.com&user:MyLoginName&password:MyGeneratedToken');
$this->assertEquals($expected, $this->clientFlowLoginController->generateAppPassword('MyStateToken'));
}
@@ -573,10 +585,14 @@ class ClientFlowLoginControllerTest extends TestCase {
);
$this->request
->expects($this->once())
+ ->method('getServerProtocol')
+ ->willReturn('http');
+ $this->request
+ ->expects($this->once())
->method('getServerHost')
->willReturn('example.com');
- $expected = new Http\RedirectResponse('nc://login/server:example.com&user:MyLoginName&password:MyGeneratedToken');
+ $expected = new Http\RedirectResponse('nc://login/server:http://example.com&user:MyLoginName&password:MyGeneratedToken');
$this->assertEquals($expected, $this->clientFlowLoginController->generateAppPassword('MyStateToken'));
}
}