feat/reverb (#20)
Co-authored-by: jon brookes <marshyon@gmail.com> Reviewed-on: https://codeberg.org/headshed/share-lt/pulls/20
This commit is contained in:
parent
74bc17d019
commit
21147af908
30 changed files with 1948 additions and 29 deletions
23
tests/Feature/PreviewSiteBuiltEventTest.php
Normal file
23
tests/Feature/PreviewSiteBuiltEventTest.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
use App\Events\PreviewSiteBuilt;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
it('can broadcast preview site built event', function () {
|
||||
Event::fake();
|
||||
|
||||
PreviewSiteBuilt::dispatch('Test preview site is built', 'success');
|
||||
|
||||
Event::assertDispatched(PreviewSiteBuilt::class, function ($event) {
|
||||
return $event->message === 'Test preview site is built'
|
||||
&& $event->type === 'success';
|
||||
});
|
||||
});
|
||||
|
||||
it('has correct broadcast channel and event name', function () {
|
||||
$event = new PreviewSiteBuilt('Test message', 'success');
|
||||
|
||||
expect($event->broadcastOn())->toHaveCount(1)
|
||||
->and($event->broadcastOn()[0]->name)->toBe('filament-notifications')
|
||||
->and($event->broadcastAs())->toBe('preview-site.built');
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue