Skip to content

Commit 954a71a

Browse files
committed
fixed tests
1 parent 5a4057d commit 954a71a

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

x-pack/legacy/plugins/alerting/server/routes/create.test.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,33 @@ test('creates an alert with proper parameters', async () => {
5858
expect(statusCode).toBe(200);
5959
const response = JSON.parse(payload);
6060
expect(new Date(response.createdAt)).toEqual(createdAt);
61-
expect(omit(response, 'createdAt', 'updatedAt')).toMatchInlineSnapshot();
61+
expect(omit(response, 'createdAt', 'updatedAt')).toMatchInlineSnapshot(`
62+
Object {
63+
"actions": Array [
64+
Object {
65+
"actionTypeId": "test",
66+
"group": "default",
67+
"id": "2",
68+
"params": Object {
69+
"foo": true,
70+
},
71+
},
72+
],
73+
"alertTypeId": "1",
74+
"consumer": "bar",
75+
"id": "123",
76+
"name": "abc",
77+
"params": Object {
78+
"bar": true,
79+
},
80+
"schedule": Object {
81+
"interval": "10s",
82+
},
83+
"tags": Array [
84+
"foo",
85+
],
86+
}
87+
`);
6288
expect(alertsClient.create).toHaveBeenCalledTimes(1);
6389
expect(alertsClient.create.mock.calls[0]).toMatchInlineSnapshot(`
6490
Array [

0 commit comments

Comments
 (0)