From a1ca9de0f56a5f490880bf94be6f0bddf8610bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 25 Jan 2016 13:06:00 +0100 Subject: [PATCH] Trigger change on avatar delete --- lib/private/avatar.php | 1 + tests/lib/avatartest.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/avatar.php b/lib/private/avatar.php index 3dcb683866..ef7d99fd29 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 264ce163e2..e7d7831108 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()); }