Trigger change on avatar delete
This commit is contained in:
parent
68ef6e1bdd
commit
a1ca9de0f5
|
@ -137,6 +137,7 @@ class Avatar implements IAvatar {
|
||||||
$avatar->delete();
|
$avatar->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->user->triggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -163,7 +163,8 @@ class AvatarTest extends \Test\TestCase {
|
||||||
->method('putContent')
|
->method('putContent')
|
||||||
->with($image->data());
|
->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());
|
$this->avatar->set($image->data());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue