Added tests

This commit is contained in:
Kaustubh B 2023-09-06 18:23:36 +05:30 committed by Marek Posolda
parent c57e775102
commit 5ee2ba9372
2 changed files with 8 additions and 0 deletions

View file

@ -58,6 +58,9 @@ public class SearchQueryUtilsTest {
testParseQuery("key\"1\":val1", testParseQuery("key\"1\":val1",
"key\"1\"", "val1"); "key\"1\"", "val1");
testParseQuery("k:val1",
"k", "val1");
} }
private void testParseQuery(String query, String... expectedStr) { private void testParseQuery(String query, String... expectedStr) {

View file

@ -787,6 +787,11 @@ public class UserTest extends AbstractAdminTest {
users = realm.users().searchByAttributes(mapToSearchQuery(attributes)); users = realm.users().searchByAttributes(mapToSearchQuery(attributes));
assertEquals(9, users.size()); assertEquals(9, users.size());
attributes.clear();
attributes.put("x", "common");
users = realm.users().searchByAttributes(mapToSearchQuery(attributes));
assertEquals(0, users.size());
} }
@Test @Test