Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk authored and StyleCIBot committed Nov 13, 2019
1 parent 62308b3 commit 83f7aa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Notifications/Incident/NewIncidentNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function toMail($notifiable)
$content = trans('notifications.incident.new.mail.content', [
'name' => $this->incident->name,
]);

return (new MailMessage())
->subject(trans('notifications.incident.new.mail.subject'))
->markdown('notifications.incident.new', [
Expand Down
12 changes: 4 additions & 8 deletions tests/Functional/Notifications/MailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ protected function createIncident(array $incident)
{
$name = $incident['title'];
$message = $incident['description'];


dispatch(new CreateIncidentCommand(
$name,
Expand Down Expand Up @@ -129,13 +128,12 @@ public function testEmailNotificationSentForNewIncident()

$subscriber = $this->createSubscriber($this->fakerFactory->safeEmail);


$response = $this->post('dashboard/incidents/create', [
'name' => $this->fakerFactory->word,
'status' => 1,
'visible' => 1,
'message' => $this->fakerFactory->paragraph,
'notify' => 1
'notify' => 1,
]);

Notification::assertSentTo(
Expand All @@ -153,13 +151,13 @@ public function testEmailNotificationNotSentWhenNotifyNotCheckedForNewIncident()
$this->signIn();

$subscriber = $this->createSubscriber($this->fakerFactory->safeEmail);

$response = $this->post('dashboard/incidents/create', [
'name' => $this->fakerFactory->word,
'status' => 1,
'visible' => 1,
'message' => $this->fakerFactory->paragraph,
'notify' => 0
'notify' => 0,
]);

Notification::assertNotSentTo(
Expand All @@ -174,13 +172,11 @@ public function testEmailNotificationNotSentWhenNotifyNotCheckedForNewIncident()
public function testEmailNotificationSentForIncidentUpdate()
{
Notification::fake();


$this->signIn();

$incident = $this->createIncident($this->incidents[1]);
$subscriber = $this->createSubscriber($this->fakerFactory->safeEmail);


$response = $this->post('dashboard/incidents/'.$incident->id.'/updates/create', [
'status' => 1,
Expand All @@ -191,4 +187,4 @@ public function testEmailNotificationSentForIncidentUpdate()
[$subscriber], IncidentUpdatedNotification::class
);
}
}
}

0 comments on commit 83f7aa9

Please sign in to comment.