fix bug where aircraft restrictions aren't respected in flight calls #170
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
<?php
|
||||
|
||||
use App\Services\FlightService;
|
||||
use App\Models\Flight;
|
||||
use App\Models\User;
|
||||
use App\Models\UserBid;
|
||||
use App\Repositories\SettingRepository;
|
||||
use App\Services\FlightService;
|
||||
|
||||
class FlightTest extends TestCase
|
||||
{
|
||||
protected $flightSvc, $settingsRepo;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->addData('base');
|
||||
|
||||
$this->flightSvc = app(FlightService::class);
|
||||
$this->settingsRepo = app(SettingRepository::class);
|
||||
}
|
||||
|
||||
public function addFlight($user)
|
||||
@@ -168,7 +172,7 @@ class FlightTest extends TestCase
|
||||
*/
|
||||
public function testMultipleBidsSingleFlight()
|
||||
{
|
||||
setting('bids.disable_flight_on_bid', true);
|
||||
$this->settingsRepo->store('bids.disable_flight_on_bid', true);
|
||||
|
||||
$user1 = factory(User::class)->create();
|
||||
$user2 = factory(User::class)->create([
|
||||
@@ -224,11 +228,4 @@ class FlightTest extends TestCase
|
||||
$body = $req->json();
|
||||
$this->assertEquals(0, sizeof($body));
|
||||
}
|
||||
|
||||
public function testRestrictedFlights()
|
||||
{
|
||||
setting('bids.disable_flight_on_bid', true);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user