public function test_index_returns_matters_by_get()
{
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
Matter::where('id', '>=', 1)->delete();
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
$matters = factory(Matter::class, 3)->create();
$this->get('api/v1/matter');
$this->seeStatusCode(200);
foreach ($matters as $matter) {
$this->seeJson(['name' => $matter->name]);
}
}