Change the filtering to operate without being in the service layer #174

This commit is contained in:
Nabeel Shahzad
2018-02-09 15:42:37 -06:00
parent 17f1085ffb
commit 80cd80a5cf
2 changed files with 19 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ class FlightTest extends TestCase
public function testFindAllFlights()
{
$this->user = factory(App\Models\User::class)->create();
factory(App\Models\Flight::class, 70)->create([
factory(App\Models\Flight::class, 20)->create([
'airline_id' => $this->user->airline_id
]);
@@ -81,7 +81,7 @@ class FlightTest extends TestCase
$this->assertEquals(2, $body['meta']['last_page']);
$res = $this->get('/api/flights?page=2');
$res->assertJsonCount(20, 'data');
$res->assertJsonCount(5, 'data');
}
public function testFlightSearchApi()