aboutsummaryrefslogtreecommitdiffstats
path: root/tests/core
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-13 17:35:34 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-13 17:35:34 +0100
commit30357aaac0fc58c592ecfab4bd8271c674128316 (patch)
tree45b79a159d7df794c185671b85e5683f8b632e16 /tests/core
parent5d71eb5670acdc0c94c01fbce945ad6c062f2e25 (diff)
downloadnextcloud-server-30357aaac0fc58c592ecfab4bd8271c674128316.tar.gz
nextcloud-server-30357aaac0fc58c592ecfab4bd8271c674128316.zip
No user no avatar easy as that
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/avatar/avatarcontrollertest.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/core/avatar/avatarcontrollertest.php b/tests/core/avatar/avatarcontrollertest.php
index 3fa0ef2cee5..a5456eb6789 100644
--- a/tests/core/avatar/avatarcontrollertest.php
+++ b/tests/core/avatar/avatarcontrollertest.php
@@ -130,6 +130,7 @@ class AvatarControllerTest extends \Test\TestCase {
//Comment out until JS is fixed
//$this->assertEquals(Http::STATUS_NOT_FOUND, $response->getStatus());
+ $this->assertEquals(Http::STATUS_OK, $response->getStatus());
$this->assertEquals($this->user, $response->getData()['data']['displayname']);
}
@@ -154,17 +155,15 @@ class AvatarControllerTest extends \Test\TestCase {
* Fetch the avatar of a non-existing user
*/
public function testGetAvatarNoUser() {
- $image = new Image(OC::$SERVERROOT.'/tests/data/testimage.jpg');
- $this->avatarMock->method('get')->willReturn($image);
+ $this->avatarMock->method('get')->willReturn(null);
$this->container['AvatarManager']->method('getAvatar')->willReturn($this->avatarMock);
$response = $this->avatarController->getAvatar($this->user . 'doesnotexist', 32);
+ //Comment out until JS is fixed
+ //$this->assertEquals(Http::STATUS_NOT_FOUND, $response->getStatus());
$this->assertEquals(Http::STATUS_OK, $response->getStatus());
-
- $image2 = new Image($response->getData());
- $this->assertEquals($image->mimeType(), $image2->mimeType());
- $this->assertEquals(crc32($response->getData()), $response->getEtag());
+ $this->assertEquals('', $response->getData()['data']['displayname']);
}
/**