diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-08-06 17:45:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-06 17:45:44 +0200 |
commit | 42650f6773e14bdf6102fe3187d2521e5bf0f4a6 (patch) | |
tree | f8f9540352c588d2b45469b23d76fb8cfc02803d /tests | |
parent | e6457aa9c44f7eb19cfc54e1ac9473110a614947 (diff) | |
parent | db28aa8cd14d40a671396778a06af10879b5d14a (diff) | |
download | nextcloud-server-42650f6773e14bdf6102fe3187d2521e5bf0f4a6.tar.gz nextcloud-server-42650f6773e14bdf6102fe3187d2521e5bf0f4a6.zip |
Merge pull request #46967 from nextcloud/fix/share-not-found
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php index 03cd253044d..64a9efbfe60 100644 --- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php @@ -10,8 +10,9 @@ use OC\AppFramework\Middleware\PublicShare\Exceptions\NeedAuthenticationExceptio use OC\AppFramework\Middleware\PublicShare\PublicShareMiddleware; use OCP\AppFramework\AuthPublicShareController; use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\NotFoundResponse; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\RedirectResponse; +use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\PublicShareController; use OCP\Files\NotFoundException; use OCP\IConfig; @@ -236,7 +237,8 @@ class PublicShareMiddlewareTest extends \Test\TestCase { $exception = new NotFoundException(); $result = $this->middleware->afterException($controller, 'method', $exception); - $this->assertInstanceOf(NotFoundResponse::class, $result); + $this->assertInstanceOf(TemplateResponse::class, $result); + $this->assertEquals($result->getStatus(), Http::STATUS_NOT_FOUND); } public function testAfterExceptionPublicShareController() { |