Fix tests and extend the source_name field

This commit is contained in:
Nabeel Shahzad
2018-01-29 20:30:29 -06:00
parent a5f51f6264
commit 906a8ef5fe
6 changed files with 31 additions and 12 deletions

View File

@@ -45,6 +45,7 @@ $factory->define(App\Models\Pirep::class, function (Faker $faker) {
'route' => $faker->text(200),
'notes' => $faker->text(200),
'source' => $faker->randomElement([PirepSource::MANUAL, PirepSource::ACARS]),
'source_name' => 'Test Factory',
'state' => PirepState::PENDING,
'status' => PirepStatus::SCHEDULED,
'raw_data' => $raw_data ?: $raw_data = json_encode(['key' => 'value']),

View File

@@ -40,7 +40,7 @@ class CreatePirepTables extends Migration
$table->text('route')->nullable();
$table->text('notes')->nullable();
$table->unsignedTinyInteger('source')->nullable()->default(0);
$table->string('source_name', 20)->nullable();
$table->string('source_name', 25)->nullable();
$table->tinyInteger('flight_type')->default(FlightType::PASSENGER);
$table->tinyInteger('state')->default(PirepState::PENDING);
$table->tinyInteger('status')->default(PirepStatus::SCHEDULED);