389 API Changes (#393)
* Update PHPUnit to 8 * Fix API endpoints closes #389 * Update pagination method in Repository contract to look at the page number closes #390 * Remove unused imports * Fix tests in FlightTests * Typecast page * Don't register factories * Remove Factory loading * Remove unused imports
This commit is contained in:
@@ -165,12 +165,12 @@ class FlightTest extends TestCase
|
||||
'airline_id' => $this->user->airline_id,
|
||||
]);
|
||||
|
||||
$res = $this->get('/api/flights');
|
||||
$res = $this->get('/api/flights?limit=10');
|
||||
|
||||
$body = $res->json();
|
||||
$this->assertEquals(2, $body['meta']['last_page']);
|
||||
|
||||
$res = $this->get('/api/flights?page=2');
|
||||
$res = $this->get('/api/flights?page=2&limit=5');
|
||||
$res->assertJsonCount(5, 'data');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user