You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
660 B

<?php
namespace Tests\Feature\Api;
use Tests\TestCase;
use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/**
* Manage Projects API Feature Test.
*
* @author Nafies Luthfi <nafiesl@gmail.com>
*/
class ApiManageProjectsTest extends TestCase
{
use DatabaseMigrations;
/** @test */
public function user_can_get_project_lists()
{
$user = $this->adminUserSigningIn();
$project = factory(Project::class, 1)->create();
$this->getJson(route('api.projects.index'), [
'Authorization' => 'Bearer '.$user->api_token,
]);
$this->seeStatusCode(200);
}
}