summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-04-24 13:31:17 +0200
committerJulius Härtl <jus@bitgrid.net>2020-04-24 14:46:07 +0200
commitd7161b4eee996554607d0d06da399cd299d8df52 (patch)
tree3fe3bab50c5c48ba1bb01970250e5282f2feaab3 /apps/dav/tests
parent84a35361599640d838815a4127eab58e49f052fc (diff)
downloadnextcloud-server-d7161b4eee996554607d0d06da399cd299d8df52.tar.gz
nextcloud-server-d7161b4eee996554607d0d06da399cd299d8df52.zip
Only catch anonymous OPTIONS for Office
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/DAV/AnonymousOptionsTest.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
index 6aabb4845fe..c8940533ab0 100644
--- a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
+++ b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
@@ -53,18 +53,36 @@ class AnonymousOptionsTest extends TestCase {
public function testAnonymousOptionsRoot() {
$response = $this->sendRequest('OPTIONS', '');
- $this->assertEquals(200, $response->getStatus());
+ $this->assertEquals(401, $response->getStatus());
}
public function testAnonymousOptionsNonRoot() {
$response = $this->sendRequest('OPTIONS', 'foo');
- $this->assertEquals(200, $response->getStatus());
+ $this->assertEquals(401, $response->getStatus());
}
public function testAnonymousOptionsNonRootSubDir() {
$response = $this->sendRequest('OPTIONS', 'foo/bar');
+ $this->assertEquals(401, $response->getStatus());
+ }
+
+ public function testAnonymousOptionsRootOffice() {
+ $response = $this->sendRequest('OPTIONS', '', 'Microsoft Office does strange things');
+
+ $this->assertEquals(200, $response->getStatus());
+ }
+
+ public function testAnonymousOptionsNonRootOffice() {
+ $response = $this->sendRequest('OPTIONS', 'foo', 'Microsoft Office does strange things');
+
+ $this->assertEquals(200, $response->getStatus());
+ }
+
+ public function testAnonymousOptionsNonRootSubDirOffice() {
+ $response = $this->sendRequest('OPTIONS', 'foo/bar', 'Microsoft Office does strange things');
+
$this->assertEquals(200, $response->getStatus());
}