Use proper URL generation function (#24576)
Fixes the redirection after login, otherwise `core/files/index` is opened which fails.
This commit is contained in:
parent
2a05035339
commit
ee0ebd192a
|
@ -194,7 +194,7 @@ class LoginController extends Controller {
|
||||||
return new RedirectResponse($location);
|
return new RedirectResponse($location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new RedirectResponse($this->urlGenerator->linkTo('files', 'index'));
|
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,8 +299,8 @@ class LoginControllerTest extends TestCase {
|
||||||
->method('createSessionToken')
|
->method('createSessionToken')
|
||||||
->with($this->request, $user->getUID(), $password);
|
->with($this->request, $user->getUID(), $password);
|
||||||
$this->urlGenerator->expects($this->once())
|
$this->urlGenerator->expects($this->once())
|
||||||
->method('linkTo')
|
->method('linkToRoute')
|
||||||
->with('files', 'index')
|
->with('files.view.index')
|
||||||
->will($this->returnValue($indexPageUrl));
|
->will($this->returnValue($indexPageUrl));
|
||||||
|
|
||||||
$expected = new \OCP\AppFramework\Http\RedirectResponse($indexPageUrl);
|
$expected = new \OCP\AppFramework\Http\RedirectResponse($indexPageUrl);
|
||||||
|
|
Loading…
Reference in New Issue