mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
This commit is contained in:
parent
c67a182cf2
commit
b4b6286172
89 changed files with 672 additions and 666 deletions
|
|
@ -8,14 +8,14 @@ use App\Notifications\BatteryLow;
|
|||
use App\Notifications\Channels\WebhookChannel;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
test('battery low notification has correct via channels', function () {
|
||||
test('battery low notification has correct via channels', function (): void {
|
||||
$device = Device::factory()->create();
|
||||
$notification = new BatteryLow($device);
|
||||
|
||||
expect($notification->via(new User()))->toBe(['mail', WebhookChannel::class]);
|
||||
});
|
||||
|
||||
test('battery low notification creates correct mail message', function () {
|
||||
test('battery low notification creates correct mail message', function (): void {
|
||||
$device = Device::factory()->create([
|
||||
'name' => 'Test Device',
|
||||
'last_battery_voltage' => 3.0,
|
||||
|
|
@ -29,7 +29,7 @@ test('battery low notification creates correct mail message', function () {
|
|||
expect($mailMessage->viewData['device'])->toBe($device);
|
||||
});
|
||||
|
||||
test('battery low notification creates correct webhook message', function () {
|
||||
test('battery low notification creates correct webhook message', function (): void {
|
||||
config([
|
||||
'services.webhook.notifications.topic' => 'battery.low',
|
||||
'app.name' => 'Test App',
|
||||
|
|
@ -60,7 +60,7 @@ test('battery low notification creates correct webhook message', function () {
|
|||
]);
|
||||
});
|
||||
|
||||
test('battery low notification creates correct array representation', function () {
|
||||
test('battery low notification creates correct array representation', function (): void {
|
||||
$device = Device::factory()->create([
|
||||
'name' => 'Test Device',
|
||||
'last_battery_voltage' => 3.0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue