Refactor fares inheritance #905 (#906)

This commit is contained in:
Nabeel S
2020-10-27 18:46:15 -04:00
committed by GitHub
parent 060bebf8fe
commit dc7efc981c
8 changed files with 187 additions and 121 deletions

View File

@@ -476,6 +476,7 @@ class ImporterTest extends TestCase
$this->assertCount(1, $status['errors']);
// See if it imported
/** @var Flight $flight */
$flight = Flight::where([
'airline_id' => $airline->id,
'flight_number' => '1972',
@@ -514,7 +515,7 @@ class ImporterTest extends TestCase
$this->assertEquals('C41', $dep_gate['value']);
// Check the fare class
$fares = $this->fareSvc->getForFlight($flight);
$fares = $this->fareSvc->getFareWithOverrides(null, $flight->fares);
$this->assertCount(3, $fares);
$first = $fares->where('code', 'Y')->first();