summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-03-03 16:15:14 +0100
committerGitHub <noreply@github.com>2020-03-03 16:15:14 +0100
commit6ea1aef0315fa2812ad80e0af8456531e19ea642 (patch)
tree90d0dfb13f3adbede6ed096ab8b2606304548ee8 /tests
parent57707aaec670cadcbc44b1fd35b2330232d025f1 (diff)
parent68148f4073948a39e7247c3e9b5e6a4317d25fd0 (diff)
downloadnextcloud-server-6ea1aef0315fa2812ad80e0af8456531e19ea642.tar.gz
nextcloud-server-6ea1aef0315fa2812ad80e0af8456531e19ea642.zip
Merge pull request #19723 from nextcloud/bug/18603/avatar-response
Always use status 200 for avatar response
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/AvatarControllerTest.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php
index 284c82310a1..5c66c06a2c5 100644
--- a/tests/Core/Controller/AvatarControllerTest.php
+++ b/tests/Core/Controller/AvatarControllerTest.php
@@ -193,6 +193,8 @@ class AvatarControllerTest extends \Test\TestCase {
$this->assertEquals(Http::STATUS_OK, $response->getStatus());
$this->assertArrayHasKey('Content-Type', $response->getHeaders());
$this->assertEquals('image type', $response->getHeaders()['Content-Type']);
+ $this->assertArrayHasKey('X-NC-IsCustomAvatar', $response->getHeaders());
+ $this->assertEquals('1', $response->getHeaders()['X-NC-IsCustomAvatar']);
$this->assertEquals('my etag', $response->getETag());
}
@@ -206,9 +208,11 @@ class AvatarControllerTest extends \Test\TestCase {
$response = $this->avatarController->getAvatar('userId', 32);
- $this->assertEquals(Http::STATUS_CREATED, $response->getStatus());
+ $this->assertEquals(Http::STATUS_OK, $response->getStatus());
$this->assertArrayHasKey('Content-Type', $response->getHeaders());
$this->assertEquals('image type', $response->getHeaders()['Content-Type']);
+ $this->assertArrayHasKey('X-NC-IsCustomAvatar', $response->getHeaders());
+ $this->assertEquals('0', $response->getHeaders()['X-NC-IsCustomAvatar']);
$this->assertEquals('my etag', $response->getETag());
}