Skip to content

Commit 9fc2a18

Browse files
authored
Merge pull request #963 from daveroverts/fix-test
ci(ci): set mailer to log to prevent sending emails
2 parents 081288e + bfa5e42 commit 9fc2a18

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
DB_USERNAME: root
1515
DB_PASSWORD: password
1616
BROADCAST_DRIVER: log
17+
MAIL_MAILER: log
1718
# CACHE_DRIVER: redis
1819
# QUEUE_CONNECTION: redis
1920
# SESSION_DRIVER: redis
@@ -94,6 +95,7 @@ jobs:
9495
runs-on: ubuntu-latest
9596
env:
9697
BROADCAST_DRIVER: log
98+
MAIL_MAILER: log
9799
# CACHE_DRIVER: redis
98100
# QUEUE_CONNECTION: redis
99101
# SESSION_DRIVER: redis

tests/Feature/Booking/BookingAdminDestroyTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
use App\Models\Flight;
44
use App\Models\User;
5+
use App\Notifications\BookingDeleted;
56
use Tests\TestCase;
7+
use Illuminate\Support\Facades\Mail;
68

79
it('allows an admin to delete a booking with a user', function (): void {
810
/** @var TestCase $this */
911

12+
Mail::fake();
13+
1014
/** @var User $admin */
1115
$admin = User::factory()->admin()->create();
1216

@@ -32,6 +36,8 @@
3236
it('allows an admin to delete a booking without a user', function (): void {
3337
/** @var TestCase $this */
3438

39+
Mail::fake();
40+
3541
/** @var User $admin */
3642
$admin = User::factory()->admin()->create();
3743

0 commit comments

Comments
 (0)