mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat: add tests, chore: update readme
This commit is contained in:
parent
715e6a2562
commit
e6a2bdb3bc
27 changed files with 1179 additions and 299 deletions
|
|
@ -14,12 +14,17 @@ class DeviceFactory extends Factory
|
|||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->firstName().' TRMNL',
|
||||
'name' => $this->faker->firstName().'\'s TRMNL',
|
||||
'mac_address' => $this->faker->macAddress(),
|
||||
'default_refresh_interval' => '900',
|
||||
'friendly_id' => Str::random(6),
|
||||
'api_key' => 'tD-'.Str::random(19),
|
||||
'user_id' => 1,
|
||||
'last_battery_voltage' => $this->faker->randomFloat(2, 3.0, 4.2),
|
||||
'last_rssi_level' => $this->faker->numberBetween(-100, 0),
|
||||
'last_firmware_version' => '1.6.0',
|
||||
'proxy_cloud' => $this->faker->boolean(),
|
||||
'last_log_request' => ['status' => 'success', 'timestamp' => Carbon::now()->toDateTimeString()],
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class UserFactory extends Factory
|
|||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
'assign_new_devices' => false,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue