mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-03 16:24:55 +00:00
🔥 **Cleanup:** Removed BookCase and OrangePill models, factories, migrations, and related references. Added tests for new service and meetup creation flows. Updated PHPUnit settings and browser-specific configurations.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Meetup;
|
||||
use App\Models\User;
|
||||
use App\Notifications\ModelCreatedNotification;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
|
||||
it('sends a queued mail notification for a created model', function () {
|
||||
Notification::fake();
|
||||
|
||||
$user = User::factory()->create();
|
||||
$meetup = Meetup::factory()->create();
|
||||
|
||||
$user->notify(new ModelCreatedNotification($meetup, 'meetups'));
|
||||
|
||||
Notification::assertSentTo($user, ModelCreatedNotification::class, function ($notification) use ($meetup) {
|
||||
return $notification->model->is($meetup) && $notification->resource === 'meetups';
|
||||
});
|
||||
});
|
||||
|
||||
it('uses the mail channel', function () {
|
||||
$user = User::factory()->create();
|
||||
$notification = new ModelCreatedNotification(User::factory()->make(), 'users');
|
||||
|
||||
expect($notification->via($user))->toBe(['mail']);
|
||||
});
|
||||
Reference in New Issue
Block a user