diff --git a/spec/unit/pushprocessor.spec.js b/spec/unit/pushprocessor.spec.js index b625ade4825..68480f5c791 100644 --- a/spec/unit/pushprocessor.spec.js +++ b/spec/unit/pushprocessor.spec.js @@ -302,4 +302,20 @@ describe('NotificationService', function() { const actions = pushProcessor.actionsForEvent(testEvent); expect(actions.tweaks.highlight).toEqual(false); }); + + it("a rule with no conditions matches every event.", function() { + expect(pushProcessor.ruleMatchesEvent({ + rule_id: "rule1", + actions: [], + conditions: [], + default: false, + enabled: true, + }, testEvent)).toBe(true); + expect(pushProcessor.ruleMatchesEvent({ + rule_id: "rule1", + actions: [], + default: false, + enabled: true, + }, testEvent)).toBe(true); + }); });