Add more tests

This commit is contained in:
Benoit Marty 2020-08-25 17:34:02 +02:00
parent 8226f60fad
commit 1a068ee191

View file

@ -110,6 +110,15 @@ class PushrulesConditionTest : MatrixTest {
val condition = EventMatchCondition("content.body", "ben", true)
assertFalse(condition.isSatisfied(createSimpleTextEvent("benoit")))
assertFalse(condition.isSatisfied(createSimpleTextEvent("Hello benoit")))
assertFalse(condition.isSatisfied(createSimpleTextEvent("superben")))
assert(condition.isSatisfied(createSimpleTextEvent("ben")))
assert(condition.isSatisfied(createSimpleTextEvent("hello ben")))
assert(condition.isSatisfied(createSimpleTextEvent("ben is there")))
assert(condition.isSatisfied(createSimpleTextEvent("hello ben!")))
assert(condition.isSatisfied(createSimpleTextEvent("hello Ben!")))
assert(condition.isSatisfied(createSimpleTextEvent("BEN")))
}
@Test