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
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-15 14:50:30 +0300
committerJoas Schilling <coding@schilljs.com>2020-06-25 09:29:43 +0300
commitb7060be18ddc8e48d65c5909338662df5b0ec9bb (patch)
tree8538a32f626e13d745478a2a559664a1505e642c /tests
parenta29c866292178528b92fdca1171e61e3912d766a (diff)
Fix robots "noindex, nofollow" signals
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Controller/ControllerTest.php3
-rw-r--r--tests/lib/AppFramework/Http/DataResponseTest.php1
-rw-r--r--tests/lib/AppFramework/Http/ResponseTest.php5
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php
index e07089e0c82..7c5b1931512 100644
--- a/tests/lib/AppFramework/Controller/ControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ControllerTest.php
@@ -92,7 +92,7 @@ class ControllerTest extends \Test\TestCase {
$this->controller = new ChildController($this->app, $request);
}
-
+
public function testFormatResonseInvalidFormat() {
$this->expectException(\DomainException::class);
@@ -114,6 +114,7 @@ class ControllerTest extends \Test\TestCase {
'Content-Type' => 'application/json; charset=utf-8',
'Content-Security-Policy' => "default-src 'none';base-uri 'none';manifest-src 'self'",
'Feature-Policy' => "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'",
+ 'X-Robots-Tag' => 'none',
];
$response = $this->controller->customDataResponse(['hi']);
diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php
index e7624c92d7e..a02cee67d31 100644
--- a/tests/lib/AppFramework/Http/DataResponseTest.php
+++ b/tests/lib/AppFramework/Http/DataResponseTest.php
@@ -67,6 +67,7 @@ class DataResponseTest extends \Test\TestCase {
'Cache-Control' => 'no-cache, no-store, must-revalidate',
'Content-Security-Policy' => "default-src 'none';base-uri 'none';manifest-src 'self'",
'Feature-Policy' => "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'",
+ 'X-Robots-Tag' => 'none',
];
$expectedHeaders = array_merge($expectedHeaders, $headers);
diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php
index dd82809dd85..7a064908869 100644
--- a/tests/lib/AppFramework/Http/ResponseTest.php
+++ b/tests/lib/AppFramework/Http/ResponseTest.php
@@ -51,7 +51,8 @@ class ResponseTest extends \Test\TestCase {
$expected = [
'Last-Modified' => 1,
'ETag' => 3,
- 'Something-Else' => 'hi'
+ 'Something-Else' => 'hi',
+ 'X-Robots-Tag' => 'none',
];
$this->childResponse->setHeaders($expected);
@@ -90,7 +91,7 @@ class ResponseTest extends \Test\TestCase {
public function testAddHeaderValueNullDeletesIt() {
$this->childResponse->addHeader('hello', 'world');
$this->childResponse->addHeader('hello', null);
- $this->assertEquals(3, count($this->childResponse->getHeaders()));
+ $this->assertEquals(4, count($this->childResponse->getHeaders()));
}