mirror of
https://github.com/kevin-DL/commander_league_api.git
synced 2026-01-11 18:44:32 +00:00
- Created the formats tables/migrations - Created the controller to retrieve the formats
21 lines
447 B
PHP
21 lines
447 B
PHP
<?php
|
|
|
|
namespace Http\Controllers;
|
|
|
|
use App\Http\Controllers\FormatsController;
|
|
use App\Model\Format;
|
|
use Laravel\Lumen\Testing\DatabaseMigrations;
|
|
use TestCase;
|
|
|
|
class FormatsControllerTest extends TestCase
|
|
{
|
|
use DatabaseMigrations;
|
|
|
|
public function testGetTheFormats()
|
|
{
|
|
$formats = factory(Format::class, 5)->create();
|
|
$this->json('GET', route('formats.list'))->seeStatusCode(200)->seeJson($formats->all());
|
|
}
|
|
}
|
|
|