don't attempt to convert flight type in flight exporter

This commit is contained in:
Nabeel Shahzad
2018-03-30 18:08:03 -05:00
parent 63544088cd
commit 1cbfdbdac5
2 changed files with 3 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ class FlightExporter extends ImportExport
}
$ret['days'] = $this->getDays($flight);
$ret['flight_type'] = FlightType::convertToCode($ret['flight_type']);
#$ret['flight_type'] = FlightType::convertToCode($ret['flight_type']);
$ret['fares'] = $this->getFares($flight);
$ret['fields'] = $this->getFields($flight);

View File

@@ -230,6 +230,7 @@ class ImporterTest extends TestCase
$flight = factory(App\Models\Flight::class)->create([
'airline_id' => $airline->id,
'flight_type' => 'J',
'days' => \App\Models\Enums\Days::getDaysMask([
\App\Models\Enums\Days::TUESDAY,
\App\Models\Enums\Days::SUNDAY,
@@ -262,6 +263,7 @@ class ImporterTest extends TestCase
$this->assertEquals('27', $exported['days']);
$this->assertEquals('VMS', $exported['airline']);
$this->assertEquals('J', $exported['flight_type']);
$this->assertEquals('A32X;B74X', $exported['subfleets']);
$this->assertEquals('Y?capacity=100;F', $exported['fares']);
$this->assertEquals('Departure Gate=4;Arrival Gate=C41', $exported['fields']);