diff options
author | Simon L <szaimen@e.mail.de> | 2022-02-21 14:14:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 14:14:18 +0100 |
commit | 6ab9a13ad9341bcdc1f6fc0ff866e430d5ebf956 (patch) | |
tree | 112afc5ae92e32090c9ebc43d43ce0dc113e6adf | |
parent | 9f55de994c0148e88b601bb4620f99bbd9f946e3 (diff) | |
parent | d74ff03ac1adb48672b7b1db0e6543ac532b3ba3 (diff) | |
download | nextcloud-server-6ab9a13ad9341bcdc1f6fc0ff866e430d5ebf956.tar.gz nextcloud-server-6ab9a13ad9341bcdc1f6fc0ff866e430d5ebf956.zip |
Merge pull request #31294 from nextcloud/fix/test-controller
Redirection now only happens when dir is empty
-rw-r--r-- | apps/files/tests/Controller/ViewControllerTest.php | 8 |
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')); } } |