Set IDs to unique ints so tests don't occasionally fail
This commit is contained in:
parent
17cece598b
commit
019cf9b4fb
@ -7,7 +7,7 @@ use Faker\Generator as Faker;
|
|||||||
|
|
||||||
$factory->define(App\Models\Flight::class, function (Faker $faker) {
|
$factory->define(App\Models\Flight::class, function (Faker $faker) {
|
||||||
return [
|
return [
|
||||||
'id' => null,
|
'id' => $faker->unique()->numberBetween(10, 10000000),
|
||||||
'airline_id' => function () {
|
'airline_id' => function () {
|
||||||
return factory(App\Models\Airline::class)->create()->id;
|
return factory(App\Models\Airline::class)->create()->id;
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,7 @@ use Faker\Generator as Faker;
|
|||||||
*/
|
*/
|
||||||
$factory->define(App\Models\Pirep::class, function (Faker $faker) {
|
$factory->define(App\Models\Pirep::class, function (Faker $faker) {
|
||||||
return [
|
return [
|
||||||
'id' => null,
|
'id' => $faker->unique()->numberBetween(10, 10000000),
|
||||||
'airline_id' => function () {
|
'airline_id' => function () {
|
||||||
return factory(App\Models\Airline::class)->create()->id;
|
return factory(App\Models\Airline::class)->create()->id;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user