Support default query for groups

Change-Id: I9c8b2026bb872ae08f5435039280dfd1cb25433e
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2017-01-04 13:42:51 +01:00
parent b07a4f923e
commit bad459177b
4 changed files with 49 additions and 1 deletions

View File

@@ -252,6 +252,18 @@ public abstract class AbstractQueryGroupsTest extends GerritServerTests {
assertQuery("is:visibleToAll", groupThatIsVisibleToAll);
}
@Test
public void byDefaultField() throws Exception {
GroupInfo group1 = createGroup(name("foo-group"));
GroupInfo group2 = createGroup(name("group2"));
GroupInfo group3 = createGroupWithDescription(name("group3"),
"decription that contains foo and the UUID of group2: " + group2.id);
assertQuery("non-existing");
assertQuery("foo", group1, group3);
assertQuery(group2.id, group2, group3);
}
@Test
public void withLimit() throws Exception {
GroupInfo group1 = createGroup(name("group1"));