Skip to content

Commit

Permalink
Fix some style inconsistencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Data-Kiss committed Oct 10, 2019
1 parent 509e7d9 commit f22e4c5
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions tests/Functional/Notifications/MailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

namespace CachetHQ\Tests\Cachet\Functional\Notifications;

use CachetHQ\Tests\Cachet\AbstractTestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use CachetHQ\Cachet\Settings\Repository as SettingsRepository;
use CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\CreateIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\Subscriber;
use CachetHQ\Cachet\Notifications\Incident\NewIncidentNotification;
use CachetHQ\Cachet\Notifications\IncidentUpdate\IncidentUpdatedNotification;
use CachetHQ\Cachet\Models\Subscriber;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Settings\Repository as SettingsRepository;
use CachetHQ\Tests\Cachet\AbstractTestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\Notification;
use Illuminate\Support\Str;

Expand Down Expand Up @@ -99,6 +99,7 @@ protected function createIncident(array $incident)
$name = $incident['title'];
$message = $incident['description'];


dispatch(new CreateIncidentCommand(
$name,
$this->fakerFactory->numberBetween(0, 3),
Expand Down Expand Up @@ -127,13 +128,14 @@ public function testEmailNotificationSentForNewIncident()
$this->signIn();

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



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

Notification::assertSentTo(
Expand All @@ -153,11 +155,11 @@ public function testEmailNotificationNotSentWhenNotifyNotCheckedForNewIncident()
$subscriber = $this->createSubscriber($this->fakerFactory->safeEmail);

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

Notification::assertNotSentTo(
Expand All @@ -173,13 +175,15 @@ 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,
'status' => 1,
'message' => $this->fakerFactory->paragraph,
]);

Expand Down

0 comments on commit f22e4c5

Please sign in to comment.