Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2016-02-21 18:37:19 +0300
committerOlivier Paroz <github@oparoz.com>2016-02-21 18:37:19 +0300
commit5897b0db5a86c73247af10ffdb32a05364409a8f (patch)
tree4e06ebedfd02a5a6bb5a51ecd615d5ab55809681 /tests
parent1893b9ac8ae9534d29b3f85b37345ab8ac0156ad (diff)
Change status code from 307 to 303 in unit tests
Fixes #529
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/controller/FilesApiControllerTest.php2
-rw-r--r--tests/unit/controller/FilesControllerTest.php2
-rw-r--r--tests/unit/controller/HttpErrorTest.php2
-rw-r--r--tests/unit/middleware/EnvCheckMiddlewareTest.php2
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/controller/FilesApiControllerTest.php b/tests/unit/controller/FilesApiControllerTest.php
index 1891fe1c..c4a7a00c 100644
--- a/tests/unit/controller/FilesApiControllerTest.php
+++ b/tests/unit/controller/FilesApiControllerTest.php
@@ -55,7 +55,7 @@ class FilesApiControllerTest extends FilesControllerTest {
$response = $this->controller->download($fileId, $filename);
$this->assertEquals($redirectUrl, $response->getRedirectURL());
- $this->assertEquals(Http::STATUS_TEMPORARY_REDIRECT, $response->getStatus());
+ $this->assertEquals(Http::STATUS_SEE_OTHER, $response->getStatus());
$this->assertFalse(array_key_exists('galleryErrorMessage',$response->getCookies()));
}
diff --git a/tests/unit/controller/FilesControllerTest.php b/tests/unit/controller/FilesControllerTest.php
index a9e45860..9076427a 100644
--- a/tests/unit/controller/FilesControllerTest.php
+++ b/tests/unit/controller/FilesControllerTest.php
@@ -154,7 +154,7 @@ class FilesControllerTest extends \Test\GalleryUnitTest {
$response = $this->controller->download($fileId, $filename);
$this->assertEquals($redirectUrl, $response->getRedirectURL());
- $this->assertEquals(Http::STATUS_TEMPORARY_REDIRECT, $response->getStatus());
+ $this->assertEquals(Http::STATUS_SEE_OTHER, $response->getStatus());
$this->assertEquals(
$exception->getMessage(), $response->getCookies()['galleryErrorMessage']['value']
);
diff --git a/tests/unit/controller/HttpErrorTest.php b/tests/unit/controller/HttpErrorTest.php
index 473b5e45..17ecd32f 100644
--- a/tests/unit/controller/HttpErrorTest.php
+++ b/tests/unit/controller/HttpErrorTest.php
@@ -99,7 +99,7 @@ class HttpErrorTest extends \Test\TestCase {
/** @type RedirectResponse $response */
$response = $httpError->htmlError($urlGenerator, $this->appName, $exception);
$this->assertEquals($redirectUrl, $response->getRedirectURL());
- $this->assertEquals(Http::STATUS_TEMPORARY_REDIRECT, $response->getStatus());
+ $this->assertEquals(Http::STATUS_SEE_OTHER, $response->getStatus());
$this->assertEquals($message, $response->getCookies()['galleryErrorMessage']['value']);
}
diff --git a/tests/unit/middleware/EnvCheckMiddlewareTest.php b/tests/unit/middleware/EnvCheckMiddlewareTest.php
index 51e48ff7..5e14193d 100644
--- a/tests/unit/middleware/EnvCheckMiddlewareTest.php
+++ b/tests/unit/middleware/EnvCheckMiddlewareTest.php
@@ -470,7 +470,7 @@ class EnvCheckMiddlewareTest extends \Codeception\TestCase\Test {
$this->middleware->afterException($this->controller, 'authenticate', $exception);
$this->assertEquals($redirectUrl, $response->getRedirectURL());
- $this->assertEquals(Http::STATUS_TEMPORARY_REDIRECT, $response->getStatus());
+ $this->assertEquals(Http::STATUS_SEE_OTHER, $response->getStatus());
$this->assertEquals($message, $response->getCookies()['galleryErrorMessage']['value']);
}