aboutsummaryrefslogtreecommitdiff
path: root/matrix/pushrules/condition_eventmatch_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'matrix/pushrules/condition_eventmatch_test.go')
-rw-r--r--matrix/pushrules/condition_eventmatch_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/matrix/pushrules/condition_eventmatch_test.go b/matrix/pushrules/condition_eventmatch_test.go
index 2fcd054..160edd5 100644
--- a/matrix/pushrules/condition_eventmatch_test.go
+++ b/matrix/pushrules/condition_eventmatch_test.go
@@ -47,6 +47,12 @@ func TestPushCondition_Match_KindEvent_EventType(t *testing.T) {
assert.True(t, condition.Match(blankTestRoom, event))
}
+func TestPushCondition_Match_KindEvent_EventType_IllegalGlob(t *testing.T) {
+ condition := newMatchPushCondition("type", "m.room.invalid_glo[b")
+ event := newFakeEvent("m.room.invalid_glob", map[string]interface{}{})
+ assert.False(t, condition.Match(blankTestRoom, event))
+}
+
func TestPushCondition_Match_KindEvent_Sender_Fail(t *testing.T) {
condition := newMatchPushCondition("sender", "@foo:maunium.net")
event := newFakeEvent("m.room.foo", map[string]interface{}{})