Implement creating of meta data and tests

This commit is contained in:
James Brooks
2017-06-13 19:34:50 +01:00
parent 63e38a4b2c
commit f11c1edeee
5 changed files with 49 additions and 3 deletions

View File

@@ -154,4 +154,24 @@ class IncidentTest extends AbstractApiTestCase
$this->delete('/api/v1/incidents/1');
$this->assertResponseStatus(204);
}
public function testCreateIncidentWithMeta()
{
$this->beUser();
$this->post('/api/v1/incidents', [
'name' => 'Foo',
'message' => 'Lorem ipsum dolor sit amet',
'status' => 1,
'meta' => [
'id' => 123456789,
],
]);
$this->seeJson([
'meta' => [
'id' => 123456789,
],
]);
$this->assertResponseOk();
}
}