Added tests
This commit is contained in:
parent
c57e775102
commit
5ee2ba9372
2 changed files with 8 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue