Skip to content

Commit fa61f91

Browse files
authored
Merge pull request #838 from Iterable/evan/additional-complex-criteria-test
[MOB-9727] additional complex criteria test
2 parents dad1d7e + 22f4d60 commit fa61f91

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/unit-tests/CombinationComplexCriteria.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,20 @@ final class CombinationComplexCriteria: XCTestCase {
562562
let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataComplexCriteria3)!, anonymousEvents: eventItems).getMatchedCriteria()
563563
XCTAssertEqual(matchedCriteriaId, expectedCriteriaId)
564564
}
565+
566+
func testComplexCriteria3Success2() {
567+
let eventItems: [[AnyHashable: Any]] = [
568+
[
569+
"dataType":"purchase",
570+
"createdAt": 1699246745067,
571+
"items": [["id": "12", "name": "kittens", "price": 2, "quantity": 2]]
572+
]
573+
]
574+
575+
let expectedCriteriaId = "292"
576+
let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataComplexCriteria3)!, anonymousEvents: eventItems).getMatchedCriteria()
577+
XCTAssertEqual(matchedCriteriaId, expectedCriteriaId)
578+
}
565579

566580
func testComplexCriteria3Fail() {
567581
let eventItems: [[AnyHashable: Any]] = [

0 commit comments

Comments
 (0)