mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
This commit is contained in:
parent
c67a182cf2
commit
b4b6286172
89 changed files with 672 additions and 666 deletions
|
|
@ -6,12 +6,12 @@ use App\Models\Device;
|
|||
use App\Models\Firmware;
|
||||
use App\Models\User;
|
||||
|
||||
test('firmware update command has correct signature', function () {
|
||||
test('firmware update command has correct signature', function (): void {
|
||||
$this->artisan('trmnl:firmware:update --help')
|
||||
->assertExitCode(0);
|
||||
});
|
||||
|
||||
test('firmware update command can be called', function () {
|
||||
test('firmware update command can be called', function (): void {
|
||||
$user = User::factory()->create();
|
||||
$device = Device::factory()->create(['user_id' => $user->id]);
|
||||
$firmware = Firmware::factory()->create(['version_tag' => '1.0.0']);
|
||||
|
|
@ -26,7 +26,7 @@ test('firmware update command can be called', function () {
|
|||
expect($device->update_firmware_id)->toBe($firmware->id);
|
||||
});
|
||||
|
||||
test('firmware update command updates all devices when all is selected', function () {
|
||||
test('firmware update command updates all devices when all is selected', function (): void {
|
||||
$user = User::factory()->create();
|
||||
$device1 = Device::factory()->create(['user_id' => $user->id]);
|
||||
$device2 = Device::factory()->create(['user_id' => $user->id]);
|
||||
|
|
@ -44,7 +44,7 @@ test('firmware update command updates all devices when all is selected', functio
|
|||
expect($device2->update_firmware_id)->toBe($firmware->id);
|
||||
});
|
||||
|
||||
test('firmware update command aborts when no devices selected', function () {
|
||||
test('firmware update command aborts when no devices selected', function (): void {
|
||||
$firmware = Firmware::factory()->create(['version_tag' => '1.0.0']);
|
||||
|
||||
$this->artisan('trmnl:firmware:update')
|
||||
|
|
@ -55,7 +55,7 @@ test('firmware update command aborts when no devices selected', function () {
|
|||
->assertExitCode(0);
|
||||
});
|
||||
|
||||
test('firmware update command calls firmware check when check is selected', function () {
|
||||
test('firmware update command calls firmware check when check is selected', function (): void {
|
||||
$user = User::factory()->create();
|
||||
$device = Device::factory()->create(['user_id' => $user->id]);
|
||||
$firmware = Firmware::factory()->create(['version_tag' => '1.0.0']);
|
||||
|
|
@ -70,7 +70,7 @@ test('firmware update command calls firmware check when check is selected', func
|
|||
expect($device->update_firmware_id)->toBe($firmware->id);
|
||||
});
|
||||
|
||||
test('firmware update command calls firmware check with download when download is selected', function () {
|
||||
test('firmware update command calls firmware check with download when download is selected', function (): void {
|
||||
$user = User::factory()->create();
|
||||
$device = Device::factory()->create(['user_id' => $user->id]);
|
||||
$firmware = Firmware::factory()->create(['version_tag' => '1.0.0']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue