Fix for tests - lat/lon rounding
This commit is contained in:
@@ -141,8 +141,8 @@ class AcarsTest extends TestCase
|
|||||||
|
|
||||||
# Read that if the ACARS record posted
|
# Read that if the ACARS record posted
|
||||||
$acars_data = $this->get($uri)->json()[0];
|
$acars_data = $this->get($uri)->json()[0];
|
||||||
$this->assertEquals($acars['lat'], $acars_data['lat']);
|
$this->assertEquals(round($acars['lat'], 2), round($body[0]['lat'], 2));
|
||||||
$this->assertEquals($acars['lon'], $acars_data['lon']);
|
$this->assertEquals(round($acars['lon'], 2), round($body[0]['lon'], 2));
|
||||||
$this->assertEquals($acars['log'], $acars_data['log']);
|
$this->assertEquals($acars['log'], $acars_data['log']);
|
||||||
|
|
||||||
# Make sure PIREP state moved into ENROUTE
|
# Make sure PIREP state moved into ENROUTE
|
||||||
|
|||||||
@@ -226,9 +226,7 @@ class PIREPTest extends TestCase
|
|||||||
|
|
||||||
# Should get a 400 when posting an ACARS update
|
# Should get a 400 when posting an ACARS update
|
||||||
$uri = '/api/pireps/' . $pirep_id . '/acars/position';
|
$uri = '/api/pireps/' . $pirep_id . '/acars/position';
|
||||||
$acars = factory(App\Models\Acars::class)->make([
|
$acars = factory(App\Models\Acars::class)->make()->toArray();
|
||||||
'pirep_id' => null
|
|
||||||
])->toArray();
|
|
||||||
|
|
||||||
$response = $this->post($uri, $acars);
|
$response = $this->post($uri, $acars);
|
||||||
$response->assertStatus(400);
|
$response->assertStatus(400);
|
||||||
|
|||||||
Reference in New Issue
Block a user