Implement creating of meta data and tests
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ class CreateIncidentCommandTest extends AbstractTestCase
|
||||
'occurred_at' => null,
|
||||
'template' => null,
|
||||
'template_vars' => [],
|
||||
'meta' => [],
|
||||
];
|
||||
|
||||
$object = new CreateIncidentCommand(
|
||||
@@ -53,7 +54,8 @@ class CreateIncidentCommandTest extends AbstractTestCase
|
||||
$params['stickied'],
|
||||
$params['occurred_at'],
|
||||
$params['template'],
|
||||
$params['template_vars']
|
||||
$params['template_vars'],
|
||||
$params['meta']
|
||||
);
|
||||
|
||||
return compact('params', 'object');
|
||||
|
||||
Reference in New Issue
Block a user