Game formats

- Created the formats tables/migrations
- Created the controller to retrieve the formats
This commit is contained in:
2020-10-31 19:20:53 +00:00
parent 49778dbbc8
commit 0691e5a107
13 changed files with 350 additions and 231 deletions

View File

@@ -0,0 +1,20 @@
<?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());
}
}