Skip to content

Commit

Permalink
Remove validation test on inequality restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
milaGGL committed Oct 13, 2023
1 parent b50057e commit b4ec0ba
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions firestore/integration_test_internal/src/validation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -966,32 +966,6 @@ TEST_F(ValidationTest, QueryOrderByKeyBoundsMustBeStringsWithoutSlashes) {
ErrorMessage(ErrorCase::kQueryInvalidBoundWithSlash));
}

TEST_F(ValidationTest, QueriesWithDifferentInequalityFieldsFail) {
EXPECT_ERROR(Collection()
.WhereGreaterThan("x", FieldValue::Integer(32))
.WhereLessThan("y", FieldValue::String("cat")),
ErrorMessage(ErrorCase::kQueryDifferentInequalityFields));
}

TEST_F(ValidationTest, QueriesWithInequalityDifferentThanFirstOrderByFail) {
CollectionReference collection = Collection();
std::string reason =
ErrorMessage(ErrorCase::kQueryInequalityOrderByDifferentFields);
EXPECT_ERROR(
collection.WhereGreaterThan("x", FieldValue::Integer(32)).OrderBy("y"),
reason);
EXPECT_ERROR(
collection.OrderBy("y").WhereGreaterThan("x", FieldValue::Integer(32)),
reason);
EXPECT_ERROR(collection.WhereGreaterThan("x", FieldValue::Integer(32))
.OrderBy("y")
.OrderBy("x"),
reason);
EXPECT_ERROR(collection.OrderBy("y").OrderBy("x").WhereGreaterThan(
"x", FieldValue::Integer(32)),
reason);
}

TEST_F(ValidationTest, QueriesMustNotSpecifyStartingOrEndingPointAfterOrderBy) {
CollectionReference collection = Collection();
Query query = collection.OrderBy("foo");
Expand Down

0 comments on commit b4ec0ba

Please sign in to comment.