You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-09 10:22:46 +03:00
Add test coverage around push rules with no conditions (#2219)
This commit is contained in:
committed by
GitHub
parent
9e4f109e80
commit
70efed1a58
@@ -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);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user