diff --git a/tests/AcarsTest.php b/tests/AcarsTest.php index 94c17984..1cb66f42 100644 --- a/tests/AcarsTest.php +++ b/tests/AcarsTest.php @@ -141,8 +141,8 @@ class AcarsTest extends TestCase # Read that if the ACARS record posted $acars_data = $this->get($uri)->json()[0]; - $this->assertEquals($acars['lat'], $acars_data['lat']); - $this->assertEquals($acars['lon'], $acars_data['lon']); + $this->assertEquals(round($acars['lat'], 2), round($body[0]['lat'], 2)); + $this->assertEquals(round($acars['lon'], 2), round($body[0]['lon'], 2)); $this->assertEquals($acars['log'], $acars_data['log']); # Make sure PIREP state moved into ENROUTE diff --git a/tests/PIREPTest.php b/tests/PIREPTest.php index 68135da0..10f2ea91 100644 --- a/tests/PIREPTest.php +++ b/tests/PIREPTest.php @@ -200,7 +200,7 @@ class PIREPTest extends TestCase } /** - * + * */ public function testCancelViaAPI() { @@ -226,9 +226,7 @@ class PIREPTest extends TestCase # Should get a 400 when posting an ACARS update $uri = '/api/pireps/' . $pirep_id . '/acars/position'; - $acars = factory(App\Models\Acars::class)->make([ - 'pirep_id' => null - ])->toArray(); + $acars = factory(App\Models\Acars::class)->make()->toArray(); $response = $this->post($uri, $acars); $response->assertStatus(400);