Trigger change on avatar delete

This commit is contained in:
Thomas Müller 2016-01-25 13:06:00 +01:00 committed by Roeland Jago Douma
parent 68ef6e1bdd
commit a1ca9de0f5
2 changed files with 3 additions and 1 deletions

View File

@ -137,6 +137,7 @@ class Avatar implements IAvatar {
$avatar->delete();
}
}
$this->user->triggerChange();
}
/**

View File

@ -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());
}