*/ class IncidentTemplateTest extends AbstractApiTestCase { public function test_can_get_all_incident_templates() { $templates = factory(IncidentTemplate::class, 3)->create(); $response = $this->json('GET', '/api/v1/incidents/templates'); $response->assertJsonFragment(['id' => $templates[0]->id]); $response->assertJsonFragment(['id' => $templates[1]->id]); $response->assertJsonFragment(['id' => $templates[2]->id]); $response->assertStatus(200); } public function test_cannot_get_invalid_incident_template() { $response = $this->json('GET', '/api/v1/incidents/templates/1'); $response->assertStatus(404); } }