Refuse pirep prefile is user not allowed to use aircraft #170
This commit is contained in:
@@ -10,13 +10,15 @@ use App\Models\Enums\PirepState;
|
||||
|
||||
class PIREPTest extends TestCase
|
||||
{
|
||||
protected $pirepSvc;
|
||||
protected $pirepSvc, $settingsRepo;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
$this->addData('base');
|
||||
|
||||
$this->pirepSvc = app('App\Services\PIREPService');
|
||||
$this->settingsRepo = app(SettingRepository::class);
|
||||
}
|
||||
|
||||
protected function createNewRoute()
|
||||
@@ -246,8 +248,7 @@ class PIREPTest extends TestCase
|
||||
*/
|
||||
public function testCancelViaAPI()
|
||||
{
|
||||
$this->user = factory(App\Models\User::class)->create();
|
||||
$pirep = factory(App\Models\Pirep::class)->make(['id'=>''])->toArray();
|
||||
$pirep = $this->createPirep()->toArray();
|
||||
|
||||
$uri = '/api/pireps/prefile';
|
||||
$response = $this->post($uri, $pirep);
|
||||
|
||||
Reference in New Issue
Block a user