@@ -1159,6 +1159,7 @@ - (void)testMultipleInequalityOnSpecialValues {
1159
1159
isLessThanOrEqualTo:@1]];
1160
1160
XCTAssertEqualObjects(FIRQuerySnapshotGetIDs(snapshot), (@[ @"doc6" ]));
1161
1161
}
1162
+
1162
1163
- (void)testMultipleInequalityWithArrayMembership {
1163
1164
// TODO(MIEQ): Enable this test against production when possible.
1164
1165
XCTSkipIf(![FSTIntegrationTestCase isRunningAgainstEmulator],
@@ -1567,6 +1568,49 @@ - (void)testMultipleInequalityFromCacheAndFromServer {
1567
1568
matchesResult:@[ @"doc1", @"doc3" ]];
1568
1569
}
1569
1570
1571
+ - (void)testMultipleInequalityRejectsIfDocumentKeyIsNotTheLastOrderByField {
1572
+ // TODO(MIEQ): Enable this test against production when possible.
1573
+ XCTSkipIf(![FSTIntegrationTestCase isRunningAgainstEmulator],
1574
+ "Skip this test if running against production because multiple inequality is "
1575
+ "not supported yet.");
1576
+
1577
+ FIRCollectionReference *collRef = [self collectionRef];
1578
+
1579
+ FIRQuery *query = [[collRef queryWhereField:@"key" isNotEqualTo:@42]
1580
+ queryOrderedByFieldPath:[FIRFieldPath documentID]];
1581
+
1582
+ XCTestExpectation *queryCompletion = [self expectationWithDescription:@"query"];
1583
+ [query getDocumentsWithCompletion:^(FIRQuerySnapshot *results, NSError *error) {
1584
+ XCTAssertNil(results);
1585
+ XCTAssertNotNil(error);
1586
+ XCTAssertEqual(error.code, FIRFirestoreErrorCodeInvalidArgument);
1587
+ [queryCompletion fulfill];
1588
+ }];
1589
+ [self awaitExpectations];
1590
+ }
1591
+
1592
+ - (void)testMultipleInequalityRejectsIfDocumentKeyAppearsOnlyInEqualityFilter {
1593
+ // TODO(MIEQ): Enable this test against production when possible.
1594
+ XCTSkipIf(![FSTIntegrationTestCase isRunningAgainstEmulator],
1595
+ "Skip this test if running against production because multiple inequality is "
1596
+ "not supported yet.");
1597
+
1598
+ FIRCollectionReference *collRef = [self collectionRef];
1599
+
1600
+ FIRQuery *query = [[collRef queryWhereField:@"key"
1601
+ isNotEqualTo:@42] queryWhereFieldPath:[FIRFieldPath documentID]
1602
+ isEqualTo:@"doc1"];
1603
+
1604
+ XCTestExpectation *queryCompletion = [self expectationWithDescription:@"query"];
1605
+ [query getDocumentsWithCompletion:^(FIRQuerySnapshot *results, NSError *error) {
1606
+ XCTAssertNil(results);
1607
+ XCTAssertNotNil(error);
1608
+ XCTAssertEqual(error.code, FIRFirestoreErrorCodeInvalidArgument);
1609
+ [queryCompletion fulfill];
1610
+ }];
1611
+ [self awaitExpectations];
1612
+ }
1613
+
1570
1614
- (void)testResumingAQueryShouldUseBloomFilterToAvoidFullRequery {
1571
1615
// TODO(b/291365820): Stop skipping this test when running against the Firestore emulator once
1572
1616
// the emulator is improved to include a bloom filter in the existence filter messages that it
0 commit comments