mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
chore: stricter pint rules
This commit is contained in:
parent
16b2e8436e
commit
e535496a1e
30 changed files with 134 additions and 83 deletions
|
|
@ -36,7 +36,7 @@ test('device log casts device_timestamp to datetime', function () {
|
|||
'device_timestamp' => $timestamp,
|
||||
]);
|
||||
|
||||
expect($log->device_timestamp)->toBeInstanceOf(\Carbon\Carbon::class)
|
||||
expect($log->device_timestamp)->toBeInstanceOf(Carbon\Carbon::class)
|
||||
->and($log->device_timestamp->timestamp)->toBe($timestamp->timestamp);
|
||||
});
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ test('device log factory creates valid data', function () {
|
|||
$log = DeviceLog::factory()->create();
|
||||
|
||||
expect($log->device_id)->toBeInt()
|
||||
->and($log->device_timestamp)->toBeInstanceOf(\Carbon\Carbon::class)
|
||||
->and($log->device_timestamp)->toBeInstanceOf(Carbon\Carbon::class)
|
||||
->and($log->log_entry)->toBeArray()
|
||||
->and($log->log_entry)->toHaveKeys(['creation_timestamp', 'device_status_stamp', 'log_id', 'log_message', 'log_codeline', 'log_sourcefile', 'additional_info']);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use App\Models\Plugin;
|
||||
|
||||
uses(\Illuminate\Foundation\Testing\RefreshDatabase::class);
|
||||
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
|
||||
|
||||
test('plugin has required attributes', function () {
|
||||
$plugin = Plugin::factory()->create([
|
||||
|
|
@ -26,7 +26,7 @@ test('plugin automatically generates uuid on creation', function () {
|
|||
});
|
||||
|
||||
test('plugin can have custom uuid', function () {
|
||||
$uuid = \Illuminate\Support\Str::uuid();
|
||||
$uuid = Illuminate\Support\Str::uuid();
|
||||
$plugin = Plugin::factory()->create(['uuid' => $uuid]);
|
||||
|
||||
expect($plugin->uuid)->toBe($uuid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue