fix(tests): add coverage for empty string rendering

This commit is contained in:
Łukasz Mierzwa
2018-08-26 23:15:11 +01:00
parent dac3637f87
commit 5432fee94b
2 changed files with 7 additions and 0 deletions

View File

@@ -114,6 +114,8 @@ describe("SilenceFormStore.data", () => {
it("toAlertmanagerPayload creates payload that matches snapshot", () => {
const group = MockGroup();
store.data.fillMatchersFromGroup(group);
// add empty matcher so we test empty string rendering
store.data.addEmptyMatcher();
store.data.startsAt = moment([2000, 1, 1, 0, 0, 0]);
store.data.endsAt = moment([2000, 1, 1, 1, 0, 0]);
store.data.createdBy = "me@example.com";

View File

@@ -26,6 +26,11 @@ Object {
"name": "cluster",
"value": "(dev|prod)",
},
Object {
"isRegex": false,
"name": "",
"value": "",
},
],
"startsAt": "2000-02-01T00:00:00.000Z",
}