diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-25 13:06:00 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-25 20:56:04 +0100 |
commit | a1ca9de0f56a5f490880bf94be6f0bddf8610bdb (patch) | |
tree | 38f35dd81dd5632cae11606bda7a35f9e253f91d | |
parent | 68ef6e1bdd88458259c499e7b0729a7ab92546e8 (diff) | |
download | nextcloud-server-a1ca9de0f56a5f490880bf94be6f0bddf8610bdb.tar.gz nextcloud-server-a1ca9de0f56a5f490880bf94be6f0bddf8610bdb.zip |
Trigger change on avatar delete
-rw-r--r-- | lib/private/avatar.php | 1 | ||||
-rw-r--r-- | tests/lib/avatartest.php | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/avatar.php b/lib/private/avatar.php index 3dcb6838660..ef7d99fd292 100644 --- a/lib/private/avatar.php +++ b/lib/private/avatar.php @@ -137,6 +137,7 @@ class Avatar implements IAvatar { $avatar->delete(); } } + $this->user->triggerChange(); } /** diff --git a/tests/lib/avatartest.php b/tests/lib/avatartest.php index 264ce163e27..e7d78311085 100644 --- a/tests/lib/avatartest.php +++ b/tests/lib/avatartest.php @@ -163,7 +163,8 @@ class AvatarTest extends \Test\TestCase { ->method('putContent') ->with($image->data()); - $this->user->expects($this->once())->method('triggerChange'); + // One on remove and once on setting the new avatar + $this->user->expects($this->exactly(2))->method('triggerChange'); $this->avatar->set($image->data()); } |