mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Added back in some unused asset stuff for tests
This commit is contained in:
parent
d12fc6b13c
commit
f6d198a39c
|
@ -130,6 +130,57 @@ $factory->state(Asset::class, 'phone-iphone7', function ($faker) {
|
|||
];
|
||||
});
|
||||
|
||||
$factory->state(Asset::class, 'ultrafine', function ($faker) {
|
||||
return [
|
||||
'model_id' => 17
|
||||
];
|
||||
});
|
||||
|
||||
$factory->state(Asset::class, 'ultrasharp', function ($faker) {
|
||||
return [
|
||||
'model_id' => 18
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
// These are just for unit tests, not to generate data
|
||||
|
||||
$factory->state(Asset::class, 'assigned-to-user', function ($faker) {
|
||||
return [
|
||||
'model_id' => 1,
|
||||
'assigned_to' => factory(App\Models\User::class)->create()->id,
|
||||
'assigned_type' => App\Models\User::class,
|
||||
];
|
||||
});
|
||||
$factory->state(Asset::class, 'assigned-to-location', function ($faker) {
|
||||
return [
|
||||
'model_id' => 1,
|
||||
'assigned_to' => factory(App\Models\Location::class)->create()->id,
|
||||
'assigned_type' => App\Models\Location::class,
|
||||
];
|
||||
});
|
||||
$factory->state(Asset::class, 'assigned-to-asset', function ($faker) {
|
||||
return [
|
||||
'model_id' => 1,
|
||||
'assigned_to' => factory(App\Models\Asset::class)->create()->id,
|
||||
'assigned_type' => App\Models\Asset::class,
|
||||
];
|
||||
});
|
||||
|
||||
$factory->state(Asset::class, 'requires-acceptance', function ($faker) {
|
||||
return [
|
||||
'model_id' => 1,
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
$factory->state(Asset::class, 'deleted', function ($faker) {
|
||||
return [
|
||||
'model_id' => 1,
|
||||
'deleted_at' => $faker->dateTime()
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
$factory->define(App\Models\AssetMaintenance::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
|
|
Loading…
Reference in a new issue