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
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-02-21 13:35:22 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-02-21 13:36:15 +0300
commitd74ff03ac1adb48672b7b1db0e6543ac532b3ba3 (patch)
treebddc48c389fc0808ce8e56103dce59e7afef891d /apps/files
parent4cdc8900f7325d38056060b355e8f25b79b96413 (diff)
Redirection now only happens when dir is empty
Otherwise dir it's just ignored and fileid is used Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/tests/Controller/ViewControllerTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php
index 044028a300f..cebb50860d3 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -458,7 +458,7 @@ class ViewControllerTest extends TestCase {
->willReturn('/apps/files/?dir=/test/sub');
$expected = new Http\RedirectResponse('/apps/files/?dir=/test/sub');
- $this->assertEquals($expected, $this->viewController->index('/whatever', '', '123'));
+ $this->assertEquals($expected, $this->viewController->index('', '', '123'));
}
public function testShowFileRouteWithFile() {
@@ -498,7 +498,7 @@ class ViewControllerTest extends TestCase {
->willReturn('/apps/files/?dir=/test/sub&scrollto=somefile.txt');
$expected = new Http\RedirectResponse('/apps/files/?dir=/test/sub&scrollto=somefile.txt');
- $this->assertEquals($expected, $this->viewController->index('/whatever', '', '123'));
+ $this->assertEquals($expected, $this->viewController->index('', '', '123'));
}
public function testShowFileRouteWithInvalidFileId() {
@@ -518,7 +518,7 @@ class ViewControllerTest extends TestCase {
->with('files.view.index', ['fileNotFound' => true])
->willReturn('redirect.url');
- $response = $this->viewController->index('MyDir', 'MyView', '123');
+ $response = $this->viewController->index('', 'MyView', '123');
$this->assertInstanceOf('OCP\AppFramework\Http\RedirectResponse', $response);
$this->assertEquals('redirect.url', $response->getRedirectURL());
}
@@ -575,6 +575,6 @@ class ViewControllerTest extends TestCase {
->willReturn('/apps/files/?view=trashbin&dir=/test.d1462861890/sub&scrollto=somefile.txt');
$expected = new Http\RedirectResponse('/apps/files/?view=trashbin&dir=/test.d1462861890/sub&scrollto=somefile.txt');
- $this->assertEquals($expected, $this->viewController->index('/whatever', '', '123'));
+ $this->assertEquals($expected, $this->viewController->index('', '', '123'));
}
}