Component notifications can be silenced. Closes #2316
This commit is contained in:
@@ -39,6 +39,7 @@ class UpdateComponentCommandTest extends AbstractTestCase
|
||||
'group_id' => 0,
|
||||
'enabled' => true,
|
||||
'meta' => null,
|
||||
'silent' => false,
|
||||
];
|
||||
|
||||
$object = new UpdateComponentCommand(
|
||||
@@ -50,7 +51,8 @@ class UpdateComponentCommandTest extends AbstractTestCase
|
||||
$params['order'],
|
||||
$params['group_id'],
|
||||
$params['enabled'],
|
||||
$params['meta']
|
||||
$params['meta'],
|
||||
$params['silent']
|
||||
);
|
||||
|
||||
return compact('params', 'object');
|
||||
|
||||
@@ -40,7 +40,7 @@ class ComponentStatusWasUpdatedEventTest extends AbstractComponentEventTestCase
|
||||
|
||||
$subscriber->subscriptions()->create(['component_id' => $component->id]);
|
||||
|
||||
$this->app['events']->fire(new ComponentStatusWasUpdatedEvent($user, $component, 1, 2));
|
||||
$this->app['events']->fire(new ComponentStatusWasUpdatedEvent($user, $component, 1, 2, false));
|
||||
|
||||
$this->seeMessageFor($subscriber->email);
|
||||
$this->seeMessageWithSubject(trans('notifications.component.status_update.mail.subject'));
|
||||
@@ -58,12 +58,19 @@ class ComponentStatusWasUpdatedEventTest extends AbstractComponentEventTestCase
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['user' => new User(), 'component' => new Component(), 'original_status' => 1, 'new_status' => 2];
|
||||
$params = [
|
||||
'user' => new User(),
|
||||
'component' => new Component(),
|
||||
'original_status' => 1,
|
||||
'new_status' => 2,
|
||||
'silent' => false
|
||||
];
|
||||
$object = new ComponentStatusWasUpdatedEvent(
|
||||
$params['user'],
|
||||
$params['component'],
|
||||
$params['original_status'],
|
||||
$params['new_status']
|
||||
$params['new_status'],
|
||||
$params['silent']
|
||||
);
|
||||
|
||||
return compact('params', 'object');
|
||||
|
||||
Reference in New Issue
Block a user