mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
This commit is contained in:
parent
e9fc6b2335
commit
5d3a512203
20 changed files with 1651 additions and 101 deletions
|
|
@ -20,7 +20,7 @@ test('battery low notification creates correct mail message', function () {
|
|||
'name' => 'Test Device',
|
||||
'last_battery_voltage' => 3.0,
|
||||
]);
|
||||
|
||||
|
||||
$notification = new BatteryLow($device);
|
||||
$mailMessage = $notification->toMail(new User());
|
||||
|
||||
|
|
@ -34,12 +34,12 @@ test('battery low notification creates correct webhook message', function () {
|
|||
'services.webhook.notifications.topic' => 'battery.low',
|
||||
'app.name' => 'Test App',
|
||||
]);
|
||||
|
||||
|
||||
$device = Device::factory()->create([
|
||||
'name' => 'Test Device',
|
||||
'last_battery_voltage' => 3.0,
|
||||
]);
|
||||
|
||||
|
||||
$notification = new BatteryLow($device);
|
||||
$webhookMessage = $notification->toWebhook(new User());
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ test('battery low notification creates correct array representation', function (
|
|||
'name' => 'Test Device',
|
||||
'last_battery_voltage' => 3.0,
|
||||
]);
|
||||
|
||||
|
||||
$notification = new BatteryLow($device);
|
||||
$array = $notification->toArray(new User());
|
||||
|
||||
|
|
@ -74,4 +74,3 @@ test('battery low notification creates correct array representation', function (
|
|||
'battery_percent' => $device->battery_percent,
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue