createOne(); Bus::assertDispatched(SendDiscordNotificationJob::class); }); test('dump deleted sends discord notification', function (): void { $dump = Dump::factory()->createOne(); Feature::activate(FeatureConstants::ALLOW_DISCORD_NOTIFICATIONS); Bus::fake(SendDiscordNotificationJob::class); Event::fakeExcept(DumpDeleted::class); $dump->delete(); Bus::assertDispatched(SendDiscordNotificationJob::class); }); test('dump updated sends discord notification', function (): void { $dump = Dump::factory()->createOne(); Feature::activate(FeatureConstants::ALLOW_DISCORD_NOTIFICATIONS); Bus::fake(SendDiscordNotificationJob::class); Event::fakeExcept(DumpUpdated::class); $changes = Dump::factory()->makeOne(); $dump->fill($changes->getAttributes()); $dump->save(); Bus::assertDispatched(SendDiscordNotificationJob::class); });