test: improve coverage
Some checks are pending
tests / ci (push) Waiting to run

This commit is contained in:
Benjamin Nussbaum 2025-09-24 00:45:50 +02:00
parent e9fc6b2335
commit 5d3a512203
20 changed files with 1651 additions and 101 deletions

View file

@ -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,
]);
});