diff --git a/tests/Api/IncidentTest.php b/tests/Api/IncidentTest.php index 775c45cd..586df61c 100644 --- a/tests/Api/IncidentTest.php +++ b/tests/Api/IncidentTest.php @@ -54,4 +54,32 @@ class IncidentTest extends AbstractTestCase ]); $this->seeJson(['name' => 'Foo']); } + + public function testGetNewIncident() + { + $incident = factory('CachetHQ\Cachet\Models\Incident')->create(); + + $this->get('/api/v1/incidents/1'); + $this->seeJson(['name' => $incident->name]); + } + + public function testPutIncident() + { + $this->beUser(); + $component = factory('CachetHQ\Cachet\Models\Incident')->create(); + + $this->put('/api/v1/incidents/1', [ + 'name' => 'Foo', + ]); + $this->seeJson(['name' => 'Foo']); + } + + public function testDeleteIncident() + { + $this->beUser(); + $component = factory('CachetHQ\Cachet\Models\Incident')->create(); + + $this->delete('/api/v1/incidents/1'); + $this->assertResponseStatus(204); + } }