mirror of
https://github.com/kevin-DL/commander_league_api.git
synced 2026-01-12 02:45:19 +00:00
Game formats
- Created the formats tables/migrations - Created the controller to retrieve the formats
This commit is contained in:
20
tests/Http/Controllers/FormatsControllerTest.php
Normal file
20
tests/Http/Controllers/FormatsControllerTest.php
Normal 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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user